Python Conditionals and Control Flow Tutorial #6 || Python tutorial

Veröffentlicht am: 21 Februar 2017
auf dem Kanal: Placement Raja
103
2

Python Conditionals and Control flow of a program are the concepts to discussed. Visit http://www.placementraja.com for full tutorial.
Python conditionals are the conditional statements that determines which block of code will be executed.

Python Conditionals or Conditional statements in python :

1) if (expression) statement
2) elif (expression) statement
3) else statement

Expression should return any Boolean value that is either True or False. So, expression should be Boolean expression

Types of Boolean expressions are :
1) Boolean expressions with Comparison operators ( == , != ,less than and greater than symbols )
2) Boolean expressions with Logical operators ( and , or , not )

Examples ::
Here a,b are any variable like numbers etc..

a == b
a != b
a and b
a or b
!a or !b

Python Control Flow depends on :
1 Python conditionals or python conditional statements
2 Loops like for loop, while loop etc..
3 Functions

Lets see python conditionals thoroughly

if expression:
statement
elif expression:
statements
else:
statement

The indented bunch of statements after if conditional statement or elif conditional statement will be executed if and only if expression is true.

elif (else if) will be checked only if conditional expression fails
if can be followed by if or elif statements
elif conditional should precede if conditional
else conditional will be executed if both if conditional and elif conditional fails.
Follow us :   / placementraja  
Subscribe :    / @placementraja4232  


Auf dieser Seite können Sie das Online-Video Python Conditionals and Control Flow Tutorial #6 || Python tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Placement Raja 21 Februar 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 103 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!