CS_CBSE_FINAL QP
CS_CBSE_FINAL QP
MUMBAI
SECTION A 18M
1. Which is invalid keyword of python language?
a. for b. False c. none d. elif
2. Identifier can start from
a. underscore b. digit c. hash (#) d. atrate(@)
3. Numbers data type in python is
a. Mutable b. immutable c. None of them d. both of them. .
4. String in python is
a. Index based b. ordered c. immutable d. all of the above
5. Arrange TB, ZB, PB in increasing order
a) TB, ZB, PB b) TB, PB, ZB c) ZB, PB, TB d) PB, TB, ZB
6. Which of the following is default separator character for print()
a. tab b. space c. newline d. dot
7. By default, the Python scripts are saved with
a. pyp b. pys c. py d.None of the above
8. Which of the following is invalid Identifier?
a break b. FILE34 c.FL d. Myname
9. print(3! = 4) will evaluates_________
a. True b. False c.Error d. None of the above
10. Write the output of the following code:
s="str"
sl="string"
print(s1 in s)
a. True b. False c. Error d. None of the above
11. Which one of these is floor division ?
a) / b) // c) % d) None of the mentioned
12. Multiline string in python can be created by enclosing text in
a. Single quotes(‘ ’) b. Double quotes(" ")
c. Triple quotes(‘‘‘ ’’’) d. All of the above
13. Flash memory is a type of ______ memory
a) Primary b) Secondary c) RAM d) All of these
14. The binary digits 0 and 1 which are the basic units of memory are called
a) bits b) bytes c) nibble d) None
15. Which smaller unit of the CPU performs all arithmetic and logic function in a computers
a) CU b) ALU c) both d) None
16. Base value of hexadecimal number system is
a) 10 b) 2 c) 8 d) 16
SECTION B 14M
(Each question carries 2 marks)
19. Give output:
a= input (“Give number”)
print (type (a))
b=a
print (a is b)
20. Name two mutable and two immutable data types.
21. Differentiate between in interactive and script mode in Python.
22. Enlist four features of Python programming language.
23. Give output
n=24//4//2
print (n)
m=float (10)
print (m)
print (‘Bye’ == ‘BYE’)
print (5% 10+10 < 50 and 29 < = 29)
24. Differentiate between break and continue statements using example.
OR
What is the purpose of range ( ) function? Give one example.
25. Construct logical expression to represent the following condition:
1. Weight is greater than or equal to 115 but less than 125.
2. Find the integral part of the quotient when 100 is divided by 32.
SECTION C 15M
(Each question carries 3 marks)
26. i) Give output 2m
p=8.6
q=12
r =15
s = 45
print (q + r).
print (q/4)
print (p%2 - 1)
point (50% r **2)
a = True
b = ‘False’
print (type (a))
print (type (b))
27. write a program to check if the years entered by the user is a leap year or not
OR
Write a program that takes the name and age of the user as input and displays an appropriate message
whatever the user is eligible to apply for a driving license or not the (Eligible age is 18 years)
28. Write a program to print odd numbers between 50 to 100.
OR
Write a program to find average of 5 numbers stored in a given list.
29. Write a program in Python to find sum of digits of an integer number entered by user.
30. Write a program to find whether a number given by user is Prime or Not.
OR
Write a program to find factorial of a number given by user.
SECTION D 15M
(Each question carries 5 marks)
31. Do the following conversations
i. (5/4)10 = ( )2
ii. (76)10 = ( )8
iii. (11000101)2 = ( )16
iv. (10.75)8 = ( )10
v. (58.25)10 = ( )2
vi. (10011110.10101)2 = ( )8
vii. (A5.09)16 = ( )2
viii. (B01.1)16 = ( )10
ix. (11111.1001)2 = ( )10
x. (101)10 = ( )16
32. i) Convert them in all number system 2m
a) Hexadecimal number 15
b) Decimal number 12
ii) Identify the type of Errors in statements given below for a Python code. 3m
l=5
b= int (input (‘‘Give integer number’’))
c=0
A= l * b
print (‘Perimeter is :’, A)
print (l/c)
33. Give output:
i) x = ‘abcd’
for i in range (4):
x = ‘a’
print (x)
ii) i = 1
while True:
if i % 7 = = 0 :
break
print (i)
i+=1
iii) S = ‘string’
S1= ‘string’
print (S1 in S)
SECTION E 8M
(Each question carries 4 marks)
34. Give output:
i) t= (9, ‘No’ , “Any” , 5 , [7,1,2], 3-5)
print (t[-2])
print (t[1])
print (t[0]+t[-2] [1])
print ([4])
ii) l = [3,7,2,4,9,5]
print (l [ : : -1])
print (l [2,6,2])
print (l [3 : ])
print (l [: 2 ])
35. Give output:
i) n = 5
for i in range (n)
for j in range (1, i+1) :
print (i+1, end = ‘’)
print (‘’)
ii) l = [2,1,5,7,3]
i=1
for i in l :
print (i, end = ‘ →’ )
i = i+1
******************************