Page 1
SESSION: 2024-25
REVISION TEST
CLASS-XI
SUBJECT-COMPUTER SCIENCE
TIME: 3Hrs. M.M:70
General Instructions:
This question paper contains five sections, Section Ato E.
All questions are compulsory.
Section A have 18 questions carrying01 mark each.
Section Bhas 07 Very Short Answer type questions carrying 02 marks each.
O Section C has 0S Short Answer type questions carrying 03 marks each.
Section Dhas 03 Long Answer type questions carrying 05 marks each.
OSection E has 02 questions carrying 04 marks each.
All programming questions are to be answered using Python Language only.
SECTION-A
1. State True or False
"Variable declaration is implicit in Python."
2. Which of the following can be used is invalid variable identifier(s) in Python? 1
a. Def b. None c. Try d. Return
3. Given the following dictionaries dict exam={"Exam"."AISSCE", "Year":2023} 1
dict result-{"Total":500, "Pass Marks":165}
Which statement willmerge the contents of both dictionaries?
a. dict exam.update(dictresult)
b. dict exam + dict result
c. dict exam.add(dict result)
d. dict exam.merge(dict result
4. Toconvert the read values through input() into decimal number, 0 is used. 1
5. Select the correct output of the code: 1
a= "Year 2022 at All the best"
a=a.split(2')
b=af0] +", " +a[1]+". "+a(3]
print (b)
Page 1 of 7
Page 2
(a) Year.0. at All the best (b) Year 0. at All the best
(c) Year.022. at All the best (d) Year .0. at all the best
6. rOur supervisor is very busy and asks you to log into the HR server using her user-ID and
password to retrieve some reports.
What should you do?
A) Follow the instruction of your Boss.
B) Ignore the request and hope she forgets
) Decline the request and remind your supervisor that it is against corporate policy.
D) Infom the police that your Boss is asking you to do this task.
7. Which of the following is not a violation of lPR?
a. Plagiarism b. Copyright Infringement
G. Patent
d. Trademark Infringement
8.
Consider a tuple tupl = (10, 15, 25, 30). Identify the statement that will result in an error.
a. print(tupl[2)) b. tupl(2] =20
c. print(min(tup1) d. print(len(tup1))
9.
Which of the following statement(s) would give an error after executing the following code? 1
S="Welcome to class XI" # Statement 1
print(S) # Statement 2
S="Thank you" # Statement 3
S[o]= @ # Statement 4
S-S+"Thank you" # Statement 5
a) Statement 3 (b) Statement 4
(c) Statement 5 (d) Statement 4 and 5
10. Suppose tuple T is T= (10, 12, 43, 39)
1
Find incorrect?
a) print(T[1) b) T[2] = 29
c) print(max(T) d) print(len(T)
11, Which is not a threat?
1
(a) Worm (b) Trojan
(c)Virus () E-Mail
12., Choose correct option: 1
Assertion(A): The is and not is are identity operator.
Reasoning(R);Identity operator returns True if both its
operands are having equal value otherwise False
(a) Both A and R are true and R is the correct explanation for A
Page 2 of 7
Page 3
(b) Both A and R are true and R is not the correct
explanation for A
(c) Ais True but R is False
(d) A is false but Ris True
13. If Ist=[None), what willbe the result produced on 1
evaluating the following expression, lst "3?
a. [] b.[[None], [None].[None]]
c. [None, None, None] d. None
14. What will the following expression be evaluated to in Python?
16 -(4+2) * 5 +2**3 *4
a. 54 b.46 o. 18 d. 32
1
15. What do you understand by PC intrusion?
16. Write the full form of URL. 1
Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both Aand R are true and R is the conrect explanation for A
(b) Both Aand Rare true and Ris not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
1
17. Assertion(A): Dictionaries are unordered set of elements.
Reasoning(R): In python, a dictionary can have same keys.
18. Assertion(A): The random module is a built-in module to generate the random numbers.
Reason(R): The randint) function is used to generate a random number between the specified
range in its parameter excluding the upper limit.
SECTION-B
19. What is the output of following code snippet?
L= (25,8,75, 12]
for i in range(4):
if Li]% 5=0:
L[i]|/=5
if Li]%3 =0:
LE]//=3
for i in L:
print(,i,sep=,end =#)
Page 3 of 7
Page 4
20, Rao has written a code to input a number and check whether it is prime or not. His code ie
having errors and not giving desired output. Rewrite the correct code and underline the
corrections made.
n=int(input"Enter number tocheck :: "))
for iin range (2, n/2):
if n%i-0:
print("Number is not prime \n")
break
else:
print("Number is prime n')
21, Predict the output of the Python code given below: 2
Name-"PythoN3.1"
R="
for x in range(len(Name)):
if Name[x].isupper():
R=R+Name[x].lower)
elif Name[x].islower():
R=R+Name[x].upper(0
elif Name[x].isdigit):
R=R+Name[x-1]
else:
R-R+"#"
print(R)
a) pYTHOn##@ b) pYTHOnN#@
b) pYTHOn#@ ) pYTHOnN#.
22. What are cookies? How are they used by websites to track you? 2
23. Write a Python program to input n values in the list one by one and swap the first half with 2
second half in the same list.
24. Rewrite the following code in python after removing all syntax error(s). Underline each
correction done in the code.
30-To
for Kin range(0, To)
F k%40:
print (K*4)
else:
print (K+3)
Page 4 of 7
Page 5
25. (a) Define Digital Property?
b) What is
copyright infringement?
2
(a) is the
SECTION-C
26.
pertaining to auser.
fraudulent process of attempting to acquire sensitive information 1+
(b) 2
What are the file access
permissions when you share files on the Internet?
27. (a)
Whenever you open a website you always check the
entering personal and credi/ debit card security of the website before 1+
(b) Afriend send an electronic information. Comment. 2
e-greeting card to your work email. You need to click on the
attachment to see the card. What should you do? What are the
28. (a) Expand the
possible threats? Explain
tems: i)OSS ii) SDLC?
1+
(b) Explain E-waste disposal process.
0Write a python progam to remove the last occurrence of a
character in a string entered by user. 3
30. (a) Identify the valid declaration of L:
1+
L=[1, 23, 'hi', 6] 2
() list (ii) dictionary () array (iv) tuple
(b) What possible outputs(s) are expected to be displayed on screen at the
time of execution
of the program from the following code? Also specify the
maximum values that can be
assigned to each of the variables FROM and TO.
import random
AR=[20,30,40,50,60,70]
FROM=random.randint(1,3)
TO=random.randint(2,4)
for Kin range(FROMTO+1):
print (ARK],end=#)
() 10#40#70#x (ii) 30440#50#
(ii) 5O#60#70#x (ii) 40#SO#60#
SECTION-D
31. (a) What is syntax error? Give one example.
(b) Write the output of the following Python statements. 1
count=0
for letter in 'Hello world':
if letter-l:
countt=1
print(count,letter found')
Page 5 of7
Page 6
(e) Convert the following expression to python expression:
sin2x
(d) What will be the output of following program:
plant-{} 2
plant[1]Rohit
plant[2]Sharma'
plant[name]-Ishant
plant[4]Sharma'
print (plant[2)
print (plant['name'])
print (plant[ 1)
print (plant)
32. (a) What will be the output of the following: 2+
) S= "Welcome to class XII 3
print(S.find(come)
print(S.count(o')
(i) for iin Hardik':
print(i.upper)
(b) Write a python code to print the following pattern using loops.
33. (a) How many times the loop- will execute and also convert the loop intofor loop: 2+
P=S 3
Q-35
while P<-Q:
P+-6
print(P)
(b) Write a python script to count the number of vowels in each element of a list of furmiture
and store it in dictionary for eg:- if list contains furniture-[table, 'chair, 'sofa'. 'bed,
'cabinet', 'almirah'], then output should be
Vowels{'table':2, chair:2,'sofa:2,'bed':1, cabinet:3, 'almirah':3}
Page 6 of 7
Page 7
SECTION-E
34. Teacher of Computer Science maintain two separate dictionaries named "TH and
"PR"
where"TH contains the marks of theory out of 70 and PR" contains the marks of practical
out of 30 where roll number are the kevs of the dicionaries. Now
Answer the following
questions.(Write Python Statements)
(a) Print total marks of roll number 8 1
(b) Increase theory Marks of roll number 18 by 6 1
(c) Display all the roll numbers who obtained minimum 33% in total.
35. (a) Name the Python Library modules which need to be imported to invoke the 1
following functions:
() sin() (ii) randint ()
(b) What will be the output of the following Python Code: 1
D={Name.'Raj', 'Age':56}
D2-D.copy)
print(id(D)id(D2))
(c) Identify the correct option to add new value 66 to existing tuple T=(11,22,33,44,55)
(i) T=T+ 66
(ii) T=T+(66)
(i) T=T+(66,)
(iv) T.insert(5,66)
(d) What will be the output of the following :
Mylist-[10,20,30,40]
Mylist[0]-0
for i in range (len(Mylist):
Mylist[i]*=2
Mylist[3]+=100
print(Mylist)
Page 7 of 7