AMITY INTERNATIONAL SCHOOL, SECTOR 6, VASUNDHARA
COMPUTER SCIENCE
CLASS XI
ASSESSMENT I
MM : 30 marks
Important instructions
Each part has its set of instructions. Please read them carefully
For the option mention the choice being attempted
Save your file by your name.pdf and then upload
Adhere to time deadlines
SECTION A PART I (15 marks)
INSTRUCTIONS
All questions are 1 mark questions
Attempt any 15 out of the given 18 questions
1) Python is a ___________________ language
a) Compiler based
b) Interpreter based
c) Assembler Based
2) Which of these are invalid statements
a) a,b,c = 10,20,30
b) a_b_c=20
c) a=b=c=30
d) a b c =10
3) Pick the valid identifiers from
i) If ii) _else iii) break iv) total marks
4) Find the output?
print('120'+'101'+'23.54')
5) _______ is used for multi line comment
6) Find the output (x=-3, y=4, z=3)
i) x**y//z
7) Find the output?
print ("Py\tho\n3.8")
8) Find the type
i) 0x12F
ii) 4j
9) ________________________ involves running your codes directly on the Python
shell
10) Choose the order of precedence
i) //
ii) **
iii) and
iv) not
11) print('19' in '9110091') will print _________________
12) True or False – Identifiers are case insensitive in Python
13) Write a single line statement to assign value 100,200,400 to variables y,x and z
14) Name the identity operator in Python
15) print(len(str(19.0//3)))
16) Which line of code produces an error?
1) a) “one” + “two” b) 1 + 2 c) “one” + ‘2’ d) 1+ ‘2’
17) a=4+9j
print(_________ ) #Fill in the blank to print the real and imaginary part of a
separately
18) Type of variable is assigned at run time in Python…. This concept is known as
________________
SECTION A PART II (12 marks)
INSTRUCTIONS
All questions are 2 mark questions
All questions to be attempted
There will be internal choice
19) Find the output
a='''this\n
is
house'''
print(len(a))
print(a*2)
20) Show type promotion and type casting through python examples
21) Write a Python program to calculate the compound interest. The principal, rate of
interest and time must be entered by the user.
(Formula: Compound Interest = Principal (1 + Rate/100)Time )
OR
21) Write a Python Program to find area and volume of a cylinder
Area = 2πr (h + r)
Volume = πr2 × h
22) Each statement in the below given code has an error. Mention the error and rewrite
the code after correction
4+2.9=a #Statement 1
print A #Statement 2
b=14%0 #Statement 3
c=”92”*2.0 #Statement 4
23) Find the output
N=15>9 and 4>3 or 5<6
print(N or 3)
R=14.0//3+4**1/4-2
print(N,R,sep="&&&")
24) print(15==15.0)
print(15.0 is 15)
show different results
What are the results and give your reasons for the same
OR
print(True in [‘True’, ‘False’, 4>0])
print(9 in 9)
Find the output of the above two statements
SECTION B PART I (3 marks)
25) Write a python code to find if a three digit number is a palindrome (No if statement
is to be used)
Palindromes are numbers which when reversed are the same Example 121
Answer should be True or False
OR
Write a python code to find if a 3 digit number is an Armstrong number or not
Armstrong number is a number that is equal to the sum of cubes of its digits
Example 153=1cube+5cube+3cube=1+125+27=153
Answer should be True or False
(No if or loop statement to be used)