0% found this document useful (0 votes)
39 views

Class Xi Comp Science PDF

Uploaded by

megadragoncr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Class Xi Comp Science PDF

Uploaded by

megadragoncr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

APEEJAY SCHOOL, FARIDABAD

FIRST MONTHLY TEST, 2022


COMPUTER SCIENCE
CLASS XI
Time Allowed: 1 Hr. Max Marks: 25
General Instructions:
The question paper is divided into 3 sections-A, B, C
Section A, consists of 9 questions (1-9). Each question carries 1 mark.
Section B, consists of 3 questions (10-15). Each question carries 2 marks.
Section C, consists of 3 questions (16-17). Each question carries 3 marks.
Section A
Short answers:
1. Who invented Python programming language? 1

2. Write the valid identifier: Data-rec, 1NUM,if, num123, data 1

3. What is None literal in python? 1

4. Evaluate the following expression with precedence of operator: 1


X = 2* 3/ 5 + 10 //3 - 1
5. What will be the output of the following python codes 1
a,b,c=2,1,2
a/=2
print(a)
6. What will be the output of the following code: 1
#sample program in python program
#print(“Python is Piquant language ”)
print( “ Work smartly not hardly ”)
print ( ‘ Welcome in Python world ” )
7. What will be the output of the following code: 1
A = 3 – 4 + 10
B=5*6
C = 7.0/2.0
D = “Hello” * 3
print (“Value are :“, A. B, C, D)
8. What will be the output produced by the following code fragment (s) ? 1
X = 10
X = X + 10
X=X-5
print (X)
X, Y = X - 2, 22
print (X, Y)
9. Find the output: 1
weather= ‘raining’
if weather= ‘sunny’:
print(“Wear Sunblock”)
elif weather= ‘snow’:
print(“go for Skiing”)
else:
print(“None of the above”)
Section –B

10. What do you mean by comment line in python? Explain its type 2

11. What is the difference between interactive mode and script mode in Python? 2

12. Differentiate between a keyword and an identifier. 2

13. Write corresponding Python expression 2


(1) √a2+b2+c2
(2) P+ q/(r+s)4
(3) |e2-x|
(4) 2-ye2y+4y
14. What will be the output of the following code? Explain the reason behind output of 2
every line.
A) 5 < 10 or 5
B) 5 < (10 or 5)
15. What do you understand by term immutable? Explain with a suitable example. 2

Section - C

16. Write a python program to find max among three input numbers? 3

17. Write a Program in Python to obtain the Grade of a student based on the following 3
criteria
Marks obtain Grade
Less than 33 D
33 to 44 C
45 to 59 B
60 and above A
APEEJAY SCHOOL FARIDABAD
Monthly Test- II 2022-23
CLASS XI
SUBJECT: COMPUTER SCIENCE
Time Allowed: 1Hr Max Marks: 25
Note :
 Answer the questions after carefully reading the text.
 Please write down the serial number of the question before attempting it
1. Multiple Choice Questions 1*5=5
i. Consider a tuple in python named Months = (‘Jul’, ‘Aug’, ‘Sep’). Identify the
invalid statement(s) from the given below statements:-
a)S = Months[0] b)print(Months[2])
c) Months[1] = ‘Oct’ d)LIST1 =list(Months)

ii. Which statement is true from following-


a) List is mutable & Tuple is immutable
b) List is immutable & Tuple is mutable
c) Both are Mutable.
d) Both are Immutable

iii. What will be the output after the following statements?


a = [0, 1, 2, 3]
del a[:]
print(a)
a)None b)[] c)[0, 1, 2, 3] d)NameError

iv. Is the following Python code valid? a,b=1,2,3


A. Yes, this is an example of tuple unpacking. a=1 and b=2
B. Yes, this is an example of tuple unpacking. a=(1,2) and b=3
C. No, too many values to unpack
D. Yes, this is an example of tuple unpacking. a=1 and b=(2,3)

v. Which of the following commands will create a list?


a) list1 = list() b) list1 = [] c) list1 = list([1, 2, 3]) d) all of the mentioned

2 Predict the output of the following: 1*5=5


i. a = [5,4,3,2,2,2,1]
a=a [ a [ a [ a [ 0 ] + 1 ] ] ]
print(a)

ii. my_tuple = (1, 2, 3, 4)


my_tuple.append( (5, 6, 7) )
print len(my_tuple)

iii. a=[30,23,56,[78]]
b=list(a)
a[3][0]=46
a[1]=34
print(b)

iv. T=[‘kvs’,’rpr’]
T1=range(len(T))
for i in T1:
T[i]=T[i].upper()
print(T)

v. arr = [[1, 2, 3, 4], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]
for i in range(0, 4):
print(arr[i].pop())

3. Answer the following questions:


i. Differentiate between pop() and del() function of List 2
ii. WAP to find minimum element from a list of elements along with its index in the 2
list.
iii. Write a program to remove all occurrences of a specific item from a list 2
iv. How can you add an extra element to a tuple? 2
v. What do you understand by true copy of a list? How is it different from shallow 2
copy?
vi. Write the syntax for list comprehension. 2
vii. What are list slices? Explain with its parameters. Does a slice operator always 3
produce a new list?
APEEJAY SCHOOL FARIDABAD
MID TERM EXAMINATION (2022-2023)
COMPUTER SCIENCE (083)
Class XI
Maximum Marks: 70 Time Allowed: 3 hours
--------------------------------------------------------------------------------------------------------------------------------------------------
General Instructions:
The question paper is divided into 3 sections-A, B, C
Section A consists of 15 questions (1-15). Each question carries 1 mark.
Section B consists of 14 questions (16-29) based on Python (PCT-1).
Section C consists of 6 questions (30-37) based on Computer System & Organization.
---------------------------------------------------------------------------------------------------------------------------------------------------
PART-A
Short Answers
1. Give the output of the following code: 1
>>>import math
>>> math.ceil(1.03)+math.floor(1.03)
2. Which type of value is return by the input() function ? 1

3. Give the output of the following code: 1


>>> a,b=4,2
>>> a+b**2*10
4. Name the function used to determine the memory location of a variable. 1

5. What will be the output of the following code: 1


>>>import math
>>>math. fabs(-5.03)
6. How many times will the following code be executed 1
for i in range(1,15,5):
print(i,end=’,’)
7. How many times will the following code be executed. 1
a=5
while a>0:
print(a)
print(“Bye”)
8. Name the statement to abandons the current iteration of the loop. 1

9. Name an empty statement in python. 1


Answer: Pass
10. Find the output: 1
a=(2,3) b=(2.0,3.0)
print (b==a)
11. Following set of commands are executed in shell, what will be the output? 1
>>>str="hello"
>>>str[:2]
12. What will be the output of the following code? 1
A=”Virtual Reality”
print(A.replace(‘Virtual’,’Augmented’))
i. Virtual Augmented iii. Reality Augmented
ii. Augmented Virtual iv. Augmented Reality
13. Which of the following is not a python legal string operation. 1
i i. ‘abc’+’aba’ ii. ‘abc’*3 iii. ‘abc’+3 iv. ‘abc’.lower()
14. What is the correct python code to display the last four characters of “Digital India” 1
i. str[-4:] ii. str[4:] iii. str[*str] iv. str[/4:]
15. Symbol used to end the if statement: 1
i. Semicolon(;) ii. Hyphen(-) iii. Underscore( _ ) iv. colon(:)
PART-B
16. Write the role of end and sep argument in the print and write their default value. 2
17. What will happen when you try to access the value of an undefined variable? 2
18. If you are asked to label the python loops as determinable or non-determinable, which label 2
would you give to which loop? Justify your answer.
19. What is the difference between an expression and a statement in Python? 2

20. What are membership operators? Explain their use with an example. 2
21. What is the role of indentation in python? 2
22. Name the function: 2
i. To determine type of an object
ii.returns true if all the letters in the string are in uppercase.
23. What is the difference between an expression and a statement in Python? 2

24. How many times is the word ‘Python’ printed in the following statement? 2
s = ”I love Python”
for ch in s[3:8]:
print(‘Python’)
25. ‘Comments are useful and easy way to enhance readability and understandability of a program”. 2
Elaborate with example
26. What will be the output: 2
((ch+i)/db), if
i. ch=5, i=2, db=5.0
ii. ch=36.0, i=5.0, db=5.0
27. What would be the output of the following code, if the input is: i)aaccbb ii)abccb 2
s=input("Enter a string")
count=3
while True:
if s[0]=="a":
s=s[2:]
elif s[-1]=="b":
s=s[:2]
else:
count+=1
break
print(s)
print(count)
28. What will the code written below calculating?
2

29. Write Python code for the following 3*2=6


i. Write a program that search for prime numbers from 15 through 25
ii. Write a program to find the second largest number of a list of numbers.
PART-C
30. Convert (2C9)16 to decimal 1
31. Explain the System Software with example. 2

32. How interpreter is different from compiler? 2

33. What is the utility of these software? (a) disk fragmentor (b) backup software 2

34. Explain the principal of Duality. 2


35. Compare and contrast the AND gate and the NOR gate. 2

36. Draw a circuit diagram corresponding to the following Boolean expression: 2


(A + B)(B + C)
37. Add the binary numbers 10110 and 1101 2
APEEJAY SCHOOL FARIDABAD
Monthly Test III, 2022-23
Class XI
Computer Science
Time Allowed: 1 Hour Max Marks: 25

General Instructios :
 Answer the questions after carefully reading the text.
 Please write down the serial number of the question before attempting it

1 Multiple Choice Questions: 10


a) Which of these is an effective way of securing against cyber threats?
A. Complete eradication of threats.
B. Ensure that the severity of cyber war as a threat is recognised, and that instances of
cyber warfare are identified, publicised, and acted upon immediately.
C. All of the above.
D. Acceptance that there can be no absolute security, instead design resilient IT systems
and build international cooperation and information exchange in order to reduce threat and
increase resilience.
b) Cookies were originally designed for
A. Client side programming
B. Server side programming
C. Both Client side programming and Server side programming
D. Socket programming
c) is a form of fraud in which the attacker tries to learn information such as login
credentials or account information by pretending as a reputable entitiy or person in email
A. Phishing
B. Smishing
C. Pharming
D. Vishing
d) What is the software called which when get downloaded on computer scans your hard drive for
personal information and your internet browsing habits?
A. Key-logger
B. Malware
C. Antiware
D. Spyware
e) What will be the output of the following Python code snippet?
d = {"name":"amit", "age":45}
print("amit" in d)
A. None
B. False
C. True
D. Error
f) If a is a dictionary with some key-value pairs, what does a.popitem() do?
A. Removes a random key-value pair
B. Removes all the key-value pairs
C. Removes the key-value pair for the key given as an argument
D. Invalid method for dictionary
Consider the following code and answer the questions that follow:
Book={1:'Thriller', 2:'Mystery', 3:'Crime', 4:'Children Stories'}
Library ={'5':'Madras Diaries','6':'Malgudi Days'}
g) Ramesh needs to change the title in the dictionary book from ‘Crime’ to ‘Crime Thriller’. He has
written the following command:
Book[‘Crime’]=’Crime Thriller’
But he is not getting the answer. Help him choose the correct command:
A. Book[2]=’Crime Thriller’
B. Book[3]=’Crime Thriller’
C. Book[2]=(’Crime Thriller’)
D. Book[3] =(‘Crime Thriller’)
h) The command to merge the dictionary Book with Library the command would be:
A.d=Book+Library
B.print(Book+Library)
C. Book.update(Library)
D.Library.update(Book)
i) What will be the output of the following line of code: print(list(Library))
A. [‘5’,’Madras Diaries’,’6’,’Malgudi Days’]
B. (‘5’,’Madras Diaries’,’6’,’Malgudi Days’)
C. [’Madras Diaries’,’Malgudi Days’]
D. d. [‘5’,’6’]
j) In order to check whether the key 2 is present in the dictionary Book, Ramesh uses the
following command:
2 in Book
He gets the answer ‘True’. Now to check whether the name ‘Madras Diaries’exists in the
dictionary Library, he uses the following command:
‘Madras Diaries’ in Library
But he gets the answer as ‘False’. Select the correct reason for this:
A. We cannot use the in function with values. It can be used with keys only.
B. We must use the function Library.values() along with the in operator
C. We can use the Library.items() function instead of the in operator
D. Both b and c above are correct.
2 Answer the following
a) What do you mean by private browsing? 1
b) What do you understand by Identity Theft? 1
c) Describe the following Cybercrimes: 2
Cyber Bullying
Cyber Stalking
d) What is a digital footprint and why is it important? 2
e) What is virus? What can it do to our computer? 2
f) Explain fromkeys() function with example 2
g) Write a program in python to check whether accepted key is present in dictionary or not 2
h) Sumit wants to gift his friend a football or a wrist watch. So he searched for many sports items 3
and wrist watches online. But after that everytime he goes online, his web browser shows him
advertisement about sports items and wrist watches.
a) Why is this happening?
b) How could have Sumit avoided them?
c) How can Sumit get rid of this now?
APEEJAY COMMON ANNUAL EXAMINATION(MOCK TEST), 2022-23
COMPUTER SCIENCE
CLASS XI
TIME ALLOWED: 3 HRS. MAX MARKS: 70
General Instructions:
1. This question paper contains four sections, Section A to D.
2. All questions are compulsory.
3. Section A has 15 questions carrying 01 mark each.
4. Section B has 16 Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 02 marks each.
6. Section D has 04 Long Answer type questions carrying 03 marks each.
7. All programming questions are to be answered using Python Language only
Section A 15
1 Multiple Choice question Answers:
a) Which of the following can delete an element from a list if the index of the element
is given?
i. pop() ii. Remove iii. Clear iv. all of these
b) Which of the following is not an example of computer as a weapon cyber crime?
i. Credit card fraudulent
ii. Spying someone using keylogger
iii. IPR Violation
iv. Pronography
c) Amendment to IT Act 2000 came into effect on _______.
i. 2008 Oct. 2
ii. 2009 July 3
iii. 2008 June 1
iv. 2009 Oct. 27
d) Consider the following expression:
51+4-3**3//19-3
Which of the following will be the correct output if the expression is evaluated?
i. 50
ii. 51
iii. 52
iv. 53
e) Which of the following is the result of A + 1, if input is A=0?
a) Always 0
b) Always 1
c) Vary from 0 or 1
d) None of these
f) If a list is created as
>>>l=[1,2,3,‟a‟,[“apple‟,‟green‟],5,6,7,[“red‟,‟orange‟]] then what will be the output of
the following statements:
>>>l[4][1]
i i. “apple‟ ii. “green‟ iii. “red‟ iv. “orange‟
g) Which of the following function will return the first occurrence of thespecified
element in a list.
i i. sort() ii. value() iii. index() iv. sorted()
h) Which of the following is correct to insert a single element in a tuple .i. T=4 ii.
T=(4) iii. T(4,) iv. T=[4,]
i) Which function will return key-value pairs of the dictionary
i. key( ) ii. values( ) iii. items( ) iv. get( )
j) What will be the output of the following code:
>>>l=[1,2,3,4]
>>>m=l*2
>>>n=m*2
>>>print(n)
i [1,2,3,4,1,2,3,4,1,2,3,4] ii. [1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4]
iii. [1,2,3,4][4,5,6,7] iv. [1,2,3,4]
j) Which among the following refers to the act of copying copyrighted material?
a. Hacking b. Cracking c. Piracy d. Phishing
k) Which of the following will delete key-value pair for key=‟red‟ form adictionary D1
i. Delete D1(“red”) ii. del. D1(“red”) iii. del D1[“red”] iv. del D1
l) What will be the output
>>>d1={„ramit‟:56,”Rajiv”:99}
>>>print(“Ramit” in d1)
i. True ii. False iii. No output iv. Error
m) What is the output of the following Python Code; Select any one of the
following options? import random
print(int(random.random()*
5) a)Always generate 0
b) Generate any number between 0 to 4(including both)
c) Generate any number between 0 to 5(including both)
n) The command to merge the dictionary Book with Library the command would be:
a) d=Book+Library b) print(Book+Library)
c)Book.update(Library) d)Library.update(Book)
Section B
2 a) What is Spyware? 1
b) What is the need for secure passwords? 1
c) What measure should one take to avoid and maintain confidentiality of personal 2
information?
d) What do you mean by Cyber Bullying and Cyber Stalking 2
e) What is a digital footprint and why is it important? 2
f) Convert (17.35)10 to binary form. 2
g) Simplify: P’+Q’R=P’Q’R’+P’Q.R’+P’QR+P’Q’R+PQ’R 2
h) What is (i) Authentication, (ii) Authorization? Why are these two used together? 2
i) Why are privacy settings of a social networking site so important? 2
j) How is pharming similar to and different from phishing? 2
k) How is Firewall different from an Antivirus? 2
l) What are list slices? Explain with its parameters. Does a slice operator always produce 2
a new list?
m) State De Morgan’s Law algebraically 2
Write the Boolean expression for the logic circuit shown below 2

Section C
3 a) If we have list L and tuple T, 2
T[i]=element and L[i]=element , then which statement is valid & why?
b) What possible outputs(s) are expected to be displayed on screen at the time of 2
execution of the program from the following code? Also specify the maximum
values that can be assigned to each of the variables.
import random
x=random.random()
y=random.randint(0,4)
print(int(x),":",y+int(x))
for K in range(int(x), +1):
print (K,end="#")
(i) 0:0
0#
(ii) 1:3
1#2#3#
(iii) 0: 4
0#1#2#3#4
(iv) 0:3
0#1#2#3#
c) Find the output of the following program: 2
Moves=[11, 22, 33, 44]
Queen=Moves
Moves[2]+=22
L=len(Moves)
for i in range (L):
print("Now@",Queen[L-i-1],"#", Moves[i])
d) Examine the code:
tuple1 = (11, 22, 33, 44, 55 ,66)
list1 =list(tuple1)
new_list = []
for i in list1:
if i%2==0:
new_list.append(i)
new_tuple = tuple(new_list)
print(new_tuple) 2
i. What is the program calculating? 2
ii. Can we change append with extend? Justify your answer with explanation
e) Name the function: 2
i. To check whether string contains digit
To delete an element from the end of list.
f) What would be the output of the following code, if the input is: i)aaccbb ii)abccb 2
s=input("Enter a string")
count=3
while True:
if s[0]=="a":
s=s[2:]
elif s[-1]=="b":
s=s[:2]
else:
count+=1
break
print(s)
print(count)
Section D
3 a) Write a program to input n numbers and to insert any number in a particular 2
position.
b) What would be the output of the following code: 2
list1 = ["python", "list", 1952, 2323, 432]
list2 = ["this", "is", "another", "list"]
print(list1[1:4])
print(list1[1:])
print(list1[0])
print(list1 * 2)
print(list1 + list2)
c) What will be the output of the following Python code? [A] 2
tr="Python123.com"
for i in range(len(str)):
if(str[i].isalpha()):
print(str[i-1],end='')
if(str[i].isdigit()):
print(str[i],end='')
d) Write a program that prompts the user for a string s and a character c, and 3
outputs the string produced from s by capitalizing each occurrence of the
character c in s and making all other characters lowercase.
For example, if the user inputs "Mississippi" and "s", the program outputs
"miSSiSSippi".
e) Write Python program that search for prime numbers from 15 through 25 3
e) Marks of three students “Arya”, “Romil”, “RItesh” in three subjects are available 3
in following three dictionaries respectively:
d1={1:40,2:70,3:60}
d2={1:50,2:80,3:80}
d3={1:70,2:90,3:70}
Create a nested dictionary that stores the marks details along with student
names and then prints the output as shown below:
Name: Arya
Subject(Key) Marks(Value)
1 40
2 70
3 60
Name: Romil
Subject(Key) Marks(Value)
1 50
2 80
3 80
Name: Ritesh
Subject(Key) Marks(Value)
1 70
2 90
3 70

You might also like