Professional Documents
Culture Documents
XI - Sample Paper - CompSc - 2022-23
XI - Sample Paper - CompSc - 2022-23
XI - Sample Paper - CompSc - 2022-23
year=_______________________ #statement 1
if(_______________): #statement 2
if(year%100==0):
if(year___400==0): #statement 3
print(“leap year”)
else:
print(“not a leap year”)
else:
print(“leap year”)
else:
print(“not a leap year”)
(a) Write the statement to input the year from the user in statement 1.
(b) Write the condition to be checked in statement 2.
Page 3 of 3
(c) Which operator should be used in statement 3? If she want to get the absolute
value at any step, which module and function should be used by her?
Q35 Write a program that reads a string and count & print number of vowels present in the 4
. string. Example: if input string is: “This is the world of Python”, then the output should
be: Number of vowels present in the string = 7
Page 4 of 3