Page 139 - TechPluse_C8_Flipbook
P. 139
On running the above program, we get the following output:
The continue Statement
The continue statement is used inside loops. When a continue statement is encountered inside
a loop, control of the program jumps to the beginning of the loop for next iteration, skipping the
execution of rest of the statements of the loop for the current iteration.
Syntax:
#loop statements
continue
#the code to be skipped
Program 16: To demonstrate the use of the continue statement in a loop.
On running the program, we get the following output:
FUNCTIONS
A function is a block of organized and reusable code used to perform a single or related action.
Functions receive data in the form of arguments and use it to run a specified set of statements
and produce the final output.
Conditional and Looping Statements in Python 137

