Worksheet For Ip
Worksheet For Ip
Name:
र
Class: XI
Subject: Informatics Practices Roll No.
Date:
Invigilator’s Sign. Revision Worksheet
Session: 2024-25 SUBJECT CODE: 065
Section – A
Section A consists of 8 Multiple Choice questions(1 to 8)
1) Which mode of Python gives instant result of typed statement?
i) Interactive mode ii) Script mode
iii) Combination of Interactive and Script modes iv) All of these
2) To print the value of a variable, Python uses?
i) Print statement ii) print( ) function
iii) print statement iv) Print( ) function
3) Identify the data type of the following Python object.
{‘Ravi’:20, ‘Chenab’:30, ‘Sutlej’: 25, ‘Jhelum’: 30, ‘Beas’:35}
i) List ii) Tuple
iii) Int iv) Dictionary
4) Which of the following is not a valid identifier?
i) my name ii) _myname
iii) myname iv) my_name
5) What is the output of the following code?
a = 0
for i in range(4,8):
if i%2 == 0:
a = a+1
print(a)
i) 4 ii) 8
iii) 10 iv) 18
6) Which of the following Python programs implement the flow chart shown below?
MSD/2024_25/XI/IP/Revision_Worksheet /PAGE 2 of 5
Reason(R): Only Python interpreter can force the type conversion and not the programmer.
12) Find error(s) in the following code (if any) and correct it by rewriting the code and underline the
corrections:
if n == 0
print(“zero”)
elif: n == 1
print(“one”)
elif
n == 2:
print(“two”)
else n == 3:
print(“three”)
Section – C
Section C consists of 3 Long Answer Questions (13 to 15)
13) Write the output produced by the three expressions of the following code?
a = 3 + 5/8
MSD/2024_25/XI/IP/Revision_Worksheet /PAGE 4 of 5
b = int(3 + 5/8)
c = 3 + float(5/8)
d = 3 + float(5)/8
e = 3+ 5.0/8
f = int(3 + 5/8.0)
print(a, b, c, d, e, f)
14) Write a program in Python to accept the cost price of a bike and display the road tax to be paid according
to the following criteria:
Cost Price(in Rs.) Tax
>100000 15%
>50000 and <= 100000 10%
<= 50000 5%
15) Differentiate between Inline comment and Multiline comment with example.
Section – D
Section D consists of 2 Very Long Answer Questions (16 to 17)
16) i) Write the output of the following program: (2+3)
data = [“P”,20, “R”, 10, “S”, 30]
times = 0
alpha = “ ”
add = 0
for c in range(1,6,2):
times =times + c
alpha = alpha + data[c-1]+ “@”
add = add + data[c]
print(times, add, alpha)
ii) Write a program in Python to find the sum of the geometric series given below:
17) Following code is meant to be an interactive grade calculation script for an entrance test that converts
from a percentage into a letter grade:
MSD/2024_25/XI/IP/Revision_Worksheet /PAGE 5 of 5
The program should prompt the user 100 times for grades. Unfortunately, the program was written by a
terrible coder, so there are numerous bugs in the code. Find all the bugs and fix them.
For i : range(1.. 100)
grade == float(input(“What\‟s the grade percentage?”))
if grade > 90
print(“That‟s an A+!”)
if 80 > grade > 90:
print(“ “ “An A is really good!” ” ”)
elsif 60 < grade:
print(You got an A-!)
else grade < 60:
print(“Sorry, you need an A- to qualify!”)