Python Tutorial For Beginners - Part - 11 - Conditional Statements
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 автора Лабиринт Кода
Видео Python Tutorial For Beginners - Part - 11 - Conditional Statements автора Лабиринт Кода
Информация
3 декабря 2023 г. 21:31:45
00:07:26
Похожие видео