
Python Program to show the use of if-statement :

Python program to show the working of if-else statement:

Python program to show the working of if…elif…else statement:

Program to show the working of While loop:

Program to show the working of For-in loop:


Python Script to show the working of Pass Statement
Pass is used when we are not known how this condition should be handled but it is known that this condition is sure to occur. Remember, we cannot leave the body empty of any condition or any function.
Pass means nothing, it just passes the control to very next statement, if present.

Python Script to Show the Working of Break Statement:
Break allows to terminate from the loop/iteration immediately without executing the following statements in the loop, if the condition isn’t satisfied.

Python Script to show the working of Continue Statement:
Continue allows to skip only the current event if condition isn’t satisfied and proceed with the iteration.

range() Function in Python
range(start, stop, step)
Above syntax is of range() function. It has 3 parameters:
- start: it is optional. It is the starting value and by default it is 0.
- stop: it is required. It specifies the end value.
- step: it is optional. And specifies the number of positions to be incremented.
Python Script to show the working of range() function:

Python program to print all Prime numbers:

Python program to print AP Series from 50 to 500 as first and last number respectively with difference of 17 :

Run the above codes and analyse the output. If any doubt feel free to post your problem in comments below.
Happy Coding!
