Page 95 - Digicode_AI_class_8
P. 95
D. Answer the following questions:
1. What is looping?
2. Write the syntax of the for loop.
3. What is the use of Jump statement?
4. Define the use of while statement with the help of an example.
5. Distinguish between continue and break statements.
Critical Thinking
Write the output of the following programs:
1. x=1
sum=0
while(x<=10):
sum=sum+x
x=x+1
print (sum)
2. i = 2
while True:
if i%3 == 0:
break
print(i)
i += 2
Looping Statements in Python 93

