Class XI – Computer Science – Sample Paper (Unit Test 1)
Q 1).
a. What do you mean by Operator precedence? Give examples.
b. What do you mean by Operator Associativity? Give examples
c. What are identifiers? Give examples.
d. Give Identifier Naming Rule.
e. What do you mean by a Token?
f. List the available token types in python.
Q 2). Evaluate the expression: A = 80*(45-40)//(6+4)+70%(4+2)
Q 3)
Find Output of the following code fragment:
a) Segment 1:
x, y, z = 10, 8, 15
y, z, x = x*2, y*3, z+10
print(x, y, z, sep=’%’)
b) Segment 2:
L, M, N = 10, 8, 15
P, R = L + M, P – N
print(P, R, sep=’$’)
Q. No. 4)
Identify the type of literals:
a. True b. 458 c. “False” d. 7.25
Q 5) What do you mean by Mutable type in Python? Give examples.
Q 6) Define: Immutable data type.
Q 7) Explain about types of literal in Python with examples.
Q 8) Write an algorithm to calculate & display gross salary, net salary & tax amount payable
as below:
Allowances = 30% of Basic salary
Gross salary = Basic salary + allowances
Tax amount = 10% of Gross salary.
Net salary = Gross salary - Tax amount
Q 9) Draw a flowchart to find the Sum of first N natural numbers.
Q 10) Write a pseudo code to display all the divisible numbers divisible by both 3 and 5
between 150 and 300 (Both values are inclusive)
Q 11) Write program to design an arithmetic calculator using all arithmetic operators.
Q 12) Write a program to calculate and display commission of a salesman.
Commission = 40% of sales amount
Q 13) Write a program in which input the distance in centimetres, convert and display the
output into kilometres, metres and centimetres.
Kilometres = centimetres /1,00,000
Metres = centimetres / 100
Q 14) Write a python program to check a no. is odd or even.
Q 15) Write a python program to check a no. is a multiple of 10 or not.
Q 15) Write a python program to check a no. is positive or negative or zero.
Q 16) Write a python program to compute and display (a+b)4.
𝑎4+4𝑎3𝑏+6𝑎2𝑏2+4𝑎𝑏3+𝑏4
Q 17) Write a python program to convert temperature in degree Fahrenheit to degree
Celsius.
°C = (°F - 32) * 5/9.