Page 153 - TP_Plus_v2.2_Class_8
P. 153
4. Short answer type questions.
a. What is looping?
______________________________________________________________________________
b. Write the syntax of the while loop.
______________________________________________________________________________
c. What is the use of jump statement?
______________________________________________________________________________
5. Long answer type questions.
a. What is range()?
______________________________________________________________________________
______________________________________________________________________________
b. Define the use of for statement with the help of example.
______________________________________________________________________________
______________________________________________________________________________
c. Distinguish between continue and break statements.
______________________________________________________________________________
______________________________________________________________________________
6. Competency-based/Application-based questions.
a. Riya wants to repeat a set of instructions a specific number of times, until a certain
condition becomes false. What type of construct should she use for this? Provide
its syntax.
b. Vikram needs to write a statement that will make the program skip the remaining statements in
the current block and move to the next iteration of the loop. He’s having trouble with this. What
statement should he use?
teCh Zone
Let's soLve
21 st
Century #Critical Thinking
Write the output of the following programs: Skills
a. x=1
sum=0
while(x<=10):
sum=sum+x
x=x+1
print (sum)
Loops in Python 151

