Python Tutorial For Beginners - Part - 11 - Conditional Statements

Publicado em: 10 Agosto 2018
no canal de: 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.


Nesta página do site você pode assistir ao vídeo on-line Python Tutorial For Beginners - Part - 11 - Conditional Statements duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Just Learn Python 10 Agosto 2018, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 85 vezes e gostou 0 espectadores. Boa visualização!