How to Write a Conditional Statement in Python | Python Tutorial

preview_player
Показать описание
How to Write a Conditional Statements in Python! Covering python programming with Booleans (True/False) and comparative operators.

0:00 What are Booleans? [True 1, False 0]
2:10 Logic Statements
2:30 Compound Conditional Statements (and, or)
4:55 Variables in Conditional Statements
5:25 Conditional Operators
6:20 Example Usage in a While Loop

More Python Videos!

Please like and subscribe to support this channel :)
Рекомендации по теме
Комментарии
Автор

These conditionals works like (and, or) gates.
We can you truth tables of those logic gates to understand what's the output.
Thanks Phil.

alimoradi
Автор

Hey! I just found your channel and subscribed, love what you're doing!
I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your YouTube Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos!


Cheers, happy holidays, and keep up the great work :)

empowercode
Автор

nice Video Phil, keep up the great work

felix
Автор

Question: imagine you have an if- else condition, like;
If (sample<10):
Print('sample too small'):
Else:

my question is what if you have other conditions to consider inside the 'else' condition ( for samples greater than 10). Let say you also want different output for samples greater than 10 but divisible by 5 and another output for samples greater then 10 but is a prime number.

montage