Python Tutorial For Beginners - Part - 11 - Conditional Statements

Опубликовано: 10 Август 2018
на канале: 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.


На этой странице сайта вы можете посмотреть видео онлайн Python Tutorial For Beginners - Part - 11 - Conditional Statements длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Just Learn Python 10 Август 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 85 раз и оно понравилось 0 зрителям. Приятного просмотра!