Sample Paper 11 (1)
Sample Paper 11 (1)
CLASS : XI ( )
Q. 3. (a) Find the output of the following code if the value of year is - [5x2=10]
(i) 2000 (ii) 1900
year = int (input (“enter the year”))
if year % 100 = = 0:
if year % 400 = = 0 :
print (“Leap year”)
else :
print (“Not century year”)
(b) Find the output
n=0
for i in range (1, 3) :
for j in range (1, i) :
z=i+j–1
if z % 2 = = 0 :
𝑥=𝑥+z
elif z % 3= = 0:
𝑥 = 𝑥 +z – 1
print ("𝑥 = ", 𝑥)
(c) Find the output
for 𝑥 in range (2) :
for y in range (2) :
print (𝑥, 𝑦, 𝑥 + 𝑦)
print (𝑥, 𝑦, 𝑥 + 𝑦)
Q.9. A = (10, 20, “book” , 30, 9.5, “item”, [12, 13], (3, 4), 30, 5, 30) [5]
Consider the above tuple ‘A’ and answer the following questions :
(a) len (A) (b) A [ : 6 ] (c) A [ – 8 : – 4 ] (d) A [ 5 : ]
(e) A.index (20) (f) A.index (30) (g) A.index (30, 7, 10) (h) A. count (30)
(i) A [ : 1 ] * 5 (j) any (A)
THE END