Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

What is control flow statements in python?

Description

To see the control flow statements in python3.

Process

Break statement.

  The break statement is used for premature termination of the current loop.

  After abandoning the loop, execution at the next statement is resume

Continue statement.

  The pass statement is a null operation.

Pass statement.

  Nothing happens when it executes.

  The continue statement in Python returns the control to the beginning of the current loop.

Sample Code

#break statement
print(“*****Break statement output*****”)
string=’sathish’
for i in string:
if(i==’i’):
break
#it did not take below print statement
print(“this is break statement”)
print(“Curretnt name is:”,i)

#continue statement
print(“*****continue statement output*****”)
string=’sathish’
for i in string:
if(i==’i’):
continue
print(“this is continue statement”)
print(“Curretnt name is:”,i)

#pass statement
print(“*****Pass statement output*****”)
string=’sathish’
for i in string:
if(i==’i’):
pass
print(“this is pass statement”)
print(“Curretnt name is:”,i)

Screenshots
What is control flow statements in python pass statement is a null operation control flow statements in python3