Quarterly Exam: Grade: XI Subject: Computer Science
Quarterly Exam: Grade: XI Subject: Computer Science
Instructions:
All questions are compulsory
Programming Language: Python
SEC – A 10 × 1 =10
1) Identify and write the name of the module to which the following functions belongs:
i)floor() ii) randint()
2) Who developed Python language?
3) Which of the following can be used as valid variable identifier(s) in Python
(i) total (ii) 2Total (iii) Que$tion (iv) while
4) What are pythons built in core data types?
5) Write the Data types of the following identifiers/variable(s)
A=5+4j
B=10>15
6) Out of the following operators, which ones can be used with strings?
=, +, - , *, /,>
7) What is debugging?
11) What are literals? How many types of literals are available in Python?
12) What is a comment? In how many ways can you create comments in Python.
13) Define Type Casting in Python. Give an Example
14) Write python program to do the following
i. To print Nature is Wonderful Take Care of it
ii. To read name and mobile no. of a person
15) Predict the value of R1, R2, R3, R4 from the following code fragment
X , Y = ”PEACEFUL”, “Soul”
Z , P = 12, 2
R1=X+Y
R2=Z+P
R3=X * 3
R4 = Y + Z
17) What are the advantages and disadvantages of Python programming language?
18) Identify the data types of following literals?
(i) True (ii) 33.82 (iii) “True” (iv) 565
19) Identify the data types of the following values given bellow –
3, 0XFACD, 13.0, {1:10, 2:20, 3:30}, ”14”,
2+0j, 0o11, [1, 2, 3], (3, 4, 5)
SEC – C 4 × 3 =12
20) Write the equivalent python expression for the following mathematical statements
(i) Area = πr2
(ii) x = 23+ 1412
(iii)
21) Find out the output:
a) import statistics
mvm=[5,6,7,5,6,5,5,9,11,12,23,5]
print(statistics. mean(mvm))
print(statistics. mode(mvm))
b) import random
print(random.randint(10,20))
print(random.randrange(1,20,5))
c) import math
print(math.ceil(2.36))
print(math.floor(7.41))
23) Write an algorithm and draw a flow chart sum of two numbers