Page 146 - Plus_V2.2_C8_Flipbook
P. 146
4. Short answer type questions.
a. What is looping?
______________________________________________________________________________
b. Write the syntax to the for loop.
______________________________________________________________________________
c. What is the use of Jump statement?
______________________________________________________________________________
5. Long answer type questions.
a. Draw the flowchart of the for loop.
b. Define the use of while statement with the help of example and flowchart.
c. Distinguish between continue and break statements.
fun Zone
Let's soLve Critical Thinking
1. Application based questions.
a. Sunil wants to halt the execution of a program when a particular condition becomes
true. Which Python statement should he use for this?
b. Divya wants to come out from an infinite loop? What shortcut key should she use to
complete the task?
2. Write the output of the following programs.
a. x=1 d. i = 0
sum=0 while i < 5:
while(x<=10): print(i)
sum=sum+x i += 1
x=x+1 if i == 3:
print (sum) break
b. fruits = [“apple”, else:
”banana”,”cherry”] print(0)
for x in fruits: e. i = 0
print(x) while i < 3:
c. i = 2 print (i)
while True: i += 1
if i%3 == 0: else:
break print (0)
print(i)
i += 2
144 Premium Edition-VIII

