0% found this document useful (0 votes)
26 views

Worksheet For Ip

Information practices

Uploaded by

prisha2202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Worksheet For Ip

Information practices

Uploaded by

prisha2202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

MSD/2024_25/XI/IP/Revision_Worksheet/PAGE 1 of 5

Name:

Class: XI
Subject: Informatics Practices Roll No.
Date:
Invigilator’s Sign. Revision Worksheet
Session: 2024-25 SUBJECT CODE: 065

Time allowed: 1 Hr. 30 mins. Maximum Marks: 35

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

i) Program to find whether a number is a prime number or not.


ii) Program to find whether a number is an Armstrong number or not.
iii) Program to find whether a number is an even number or not.
iv) Program to find whether a number is a Mersenne number or not.
7) What is the purpose of using ‘\t’ escape sequence?
i) It will add a horizontal tab.
ii) It will add a vertical tab.
iii) It will give error.
iv) It will type character ‘t’ on the screen.
8) Value 0.000615 is equivalent to?
i) 615E3 ii) 615E-3
iii) 0.615E3 iv) 0.615E-3
Section – B
Section B consists of 4 Short Answer questions(9 to 12)
9) i) Medhavi has written a program in Python to display the sum of digits of a number n entered by the user.
. With which initial value should the variable sum be initialised in Line 1 so that the result is calculated
accurately?
sum = _________ #Line 1
n = int(input(“Enter the number”))
while n>0:
rem = n%10
sum = sum + rem
n = n_____10 #Line 2
print(sum)
ii) Her friend, Raha, is confused and wants to know the arithmetic operator she should use in Line2 so
that the value of n is reduced with every iteration and the loop does not become an infinite loop.
MSD/2024_25/XI/IP/Revision_Worksheet /PAGE 3 of 5

10) i) Why is the following code giving error?


print(11+3)
print(„11‟+3)
ii) What will be the output produced by the following code?
print(2*„No‟ + 3*„!‟)
print(2*(„No‟+ 3*„!‟))
In the question, given below there are two statements marked as Assertion(A) and
Reason (R). Read the statements and choose the correct option.
a) Both A and R are True, and R is the correct explanation of A.
b) Both A and R are True, but R is not the correct explanation of A.
c) A is true, but R is false.
d) A is false, but R is true.
11) i) Assertion(A): The flow of control in a program can occur sequentially, selectively or iteratively.
Reason(R): The sequence construct means that the statements will get executed sequentially.
ii) Assertion(A): Type conversion can be implicit or explicit.

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:

S = a + ar + ar2 + ar3 + ar4 + …………..+ arn

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

90 and above is A+,


80-90 is A,
60-80 is A-
And everything below is Re-appear

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!”)

You might also like