Flow of control refers to the specification of the order in which the individual statements, instructions or function calls of a program are executed or evaluated. in order to control the flow of program, we have - 1. Conditional programming 2. Looping
Python is an object-oriented, high-level programming language with integrated dynamic semantics primarily for web and app development. It is extremely attractive in the field of Rapid Application Development because it offers dynamic typing and dynamic binding options .
In python If else statement is also known as conditional statements to check if the condition is true or false. And it is also known as a decision making statement. 1. If statement - It is the simple decision making statement. In this statement when we execute some lines of code then the block of statement will be executed or not i. e If the condition is true then the block of statement will be executed otherwise not. 2. If…else statement - In if statement if condition is true then it will execute a block of statement and if the condition is false then it won’t. but in this statement there are two blocks . In this statement if the condition is false then execute the else condition. 3. Nested if statement - Nested if in python is placing an if statement inside another if statement. Nested if statement helpful if you want to check another condition inside a condition. Python provides this feature to check multiple conditions in a given progr...
Comments
Post a Comment