Python Tutorial For Beginners - Part - 11 - Conditional Statements

Veröffentlicht am: 10 August 2018
auf dem Kanal: Just Learn Python
85
0

Python Tutorial For Beginners - Part - 11 - Conditional Statements

www.justlearnpython.com



Just Learn Python

Python Tutorial for Beginners

Part-11- CONDITIONAL STATEMENT

Conditionals

In Python there is only one conditional statement.

That is if-elif-else, conditional.

Indentation in Python.

Before we proceed further, its necessary to know about Indentation.

In Python indentation is very important.

Python code blocks are structured through indentation.

All statements with same indentation makes code block.

In Python code blocks have no explicit begin and end demarcation or curly braces.

Code blocks are identified by colon (:) delimiter and code indentation.

Conditionals, function definition, class definition, while, for loops etc….

use code blocks for program logic.

In Python indention is not just a style, its a must.
if-elif-else Branching.

if ([boolean-expression):

(true statements)

elif (boolean-expression):

(true statements)

else:
(false statements)

There is no switch case in Python like C,C++, or Java.


Ternary operation in Python

With if-else statement, We can also have C-Style ternary operation in Python.




Just Learn Python

All about Python programming,

In this channel you will find videos related various Python programming topics,




Like tutorials, Exercises, code snippets, Projects, tips and tricks of Python,

Python best practices , Python tutorials, Real life examples, coding practices, interview questions.


Auf dieser Seite können Sie das Online-Video Python Tutorial For Beginners - Part - 11 - Conditional Statements mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Just Learn Python 10 August 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 85 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!