CS - MS - XI - Set 2
CS - MS - XI - Set 2
SECTION A
1. b) A piece of malicious code that makes copies of themselves and 1
spread through without human interaction.
2. c) security and privacy feature 1
3. (b) He should not give any details and contact bank helpline number 1
to check the validity of the call received.
4. a. 4 bits 1
5. d. Cache memory 1
6. a. An algorithm is a step by step instruction to solve a problem. 1
7. c. 10 1
8. c) A logical expression 1
9. b) You must specify an increment/decrement value for the loop. 1
10. d) Assembler 1
11. b) or 1
13. 1
False
14. b) Phishing 1
15. a) myStr.isspace() 1
16. d) n 1
SECTION B
19. P 2
Y
T
just out of the loop
20. ASCII is a _7_____ bit code representing __128____ characters. 2
21. ual Examination 2023 and An 2
ion 2023 and 202
22. (B2F)16=(101100101111 )2 2
(10110.0101)2=(26.24 )8
23. C@D 2
C@D
D
B$
24. It cannot be permanently deleted. It is recorded in our Digital 2
Footprint. This is how many culprits who spread hate, bully others or
engage in criminal activities are traced and apprehended.
25. If the picture is downloadable and there is no water mark in the 2
picture then it may be available for the free public domain.
If picture is in free public domain like creativecommons.org,
then we can use those pictures in project without copyright
violations.
SECTION C
26. l=[10,20,30,40,50,60,70] 3
mid=int(len(l)//2)
for i in range(mid):
l[i],l[mid+i]=l[mid+i],l[i]
print(l)
27. L=[10,20,25,10,5,6,20,45] 3
length=len(L)
num=int(input("enter number whose occurrence you want to find"))
count=0
for i in range(0,length):
if L[i]==num:
count+=1
if count==0:
print("number does not exists")
else:
print("occurrence of",num,"is",count)
output
S
t
r
n
g
29. Name different types of errors in the following code and rectify as 3
well.
num1=int[input(“enter number 1)] #syntax error
num2=0
num3=10
div=num1/num2 # Runtime error
# To find the sum of two numbers
add=num1*num3 #Logical error
print(add,div)
30. (i) What are the possible outcome(s) executed from the following code? 2+1
Also specify the maximum and minimum values that can be assigned to
variable NUM.
NAV=[“LEFT”,”FRONT”,”RIGHT”,”BACK”]
NUM=random.randint(1,3)
NAVG=””
for C in range(NUM,1,-1):
NAVG=NAVG+NAV[C]
print(NAVG)
i.BACKRIGHT ii.BACKRIGHTFRONT iii. BACK iv.LEFTFRONTRIGHT
(ii) Which module is required for the above code?
Ans. random module is required for the above code.
Section D
32. Krishna Store wants to store mobile numbers of its customers in the 1+1+1+1+1+
form of a dictionary. The following program was written by the Manager 1
of the store to input n number of names and mobile numbers and store
in the dictionary. The program also helps in searching the phone number
of a particular customer. Complete the following statements of the
program written below:
dict={}
ch=’y’
while ch==’y’ or ch==’Y’:
custname=input (“Enter Customer Name”)
phone=input(“Enter phone number of the customer”)
dict[custname]= phone
ch= input(“Do you want to add more customers”)
print (dict)
cust_name= input(“Enter the name of the customer to be searched”)
for i in dict:
if i == cust_name:
print(“Customer”, cust_name, “has mobile number”,
dict[cust_name])
34 L1=[2,3,4,5,6] 2+2
Ans. [4,5,6]
or
del(L1[2:4]
print (L1[: ])
Ans. [2,3,6]
35 Answer the following questions on the basis on the code below: 4
name_1 = “RAJAT”
for i in range (0, len(name_1)+1):
print(name_1[0:i])
ii. Can this be written using a while loop? If yes, rewrite the above
code using a while loop.
name_1 = 'RAJAT'
i=0
while i<(len(name_1)+1):
print(name_1[0:i])
i=i+1
+