Monday, 27 May 2019

Control statements


Up to now we have executed the program sequential execution. This kind of programs is suited only for simple programs. Its not suits for developing the projects where complex is needed.

To develop the critical programs we need to control the statements while executing as needed. For example, we want to execute only some statements and some statements should not be executed.  In this case, Control statements come to the picture.
There are two types of statements:

1.     Simple statement
a=2
b=4
c=a+b
print(“hello world”)

2.     Control statements
Control statements:
The Control Statements are used for controlling the Execution of the program there are the three control statements 

Divided into 3 parts:
1.      Conditional
2.    Looping or repetitive statements
3.    Unconditional statements

     Next Topic: Conditional Statements
Previous Topic: Command Line arguments

No comments:

Post a Comment

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(...