You are on page 1of 3

Name : Date of issue : 27/07/2022

Class : 8 Date of submission : 30/07/2022


Subject : ICT Worksheet No : 05
Topic : Python programming Assessed By : Teacher

I. Choose the correct answer:


1. What is the output of the following program? ( )
a=5
b=10
if a>b:
print("Yes")

a. Yes b. No c. Error d. No output


2. What is the output of the following program? ( )
a=5
b=10
if a>b:
print("Yes")
else:
print(“No”)

a. Yes b. No c. Error d. No output

3. What is the output of the following program? ( )


i=1
while(i<=5):
print(i)
i=i+1

a. 1 to 10 numbers b. 1 to 5 numbers c. 1 d. 5

4. What data type is 3.95? ( )

a. integer b. float c. string d. character


5. What would the output of this code be if the user entered the value 70? ( )

a. Pass b. Fail c. Merit d. Distinction

6. What would the outcome of this program be? ( )

a. 22 b. 50 c. Nothing, it won't run due to errors in the code d. 38

7. What would the outcome of this program be? ( )

i=1
while i<15:
print(i)
i=i+1

a. prints 1 to 10 numbers b. prints 10 to 1 numbers

c. prints 1 to 15 numbers d. prints 1 to 14 numbers

8. What would the outcome of this program be? ( )

i=5
while i<=50:
print(i)
i=i+5

a. prints 5 to 50 numbers b. prints 5 to 49 numbers

c. prints 5 to 55 numbers d. prints multiples of 5 upto 50


9. What would the outcome of this program be? ( )

i=1
while i<10:
print(i)
i=i+1
if(i==5):
break

a. prints 1 to 10 numbers b. prints 1 to 9 numbers

c. prints 1 to 4 numbers d. prints 1 to 5 numbers

10. What would the outcome of this program be? ( )

i=0
while i<10:
i=i+1
if(i==5):
continue
print(i)

a. prints 1 to 10 numbers b. prints 1 to 9 numbers

c. prints 1 to 10 numbers except 5 d. prints 1 to 9 numbers except 5

You might also like