0
What Does that means??
I am new in python and learning python for beginners. can you tell me about this EASILY. You will help a lot! {You can chain multiple conditional statements in an if statement using the Boolean operators.}
7 ответов
+ 4
Abhimanyu I'm sorry. May I recommend reading further online? There are millions of websites with their own explanation of almost everything. Perhaps you'll find the best explanation that resonates with you.
+ 1
You question is about:
{You can chain multiple conditional statements in an if statement using the Boolean operators.}
1 conditional statement = (for example)
if x == 2:
print("x = 2")
2 conditional statements =
if x == 2 or x == 3
.....
3 conditional statements =
if x == 2 and y == 5 and z == 0
.....
and so on.
2 chained conditional statements =
if(x == 2 or x == 3) and (y == 5 or y == 6)
.....
3 chained conditional statements =
if(x == 2 and y == 5) or (x == 3 and y == 6) or (z == 0)
.....
Did that help?
0
Which course are you doing? Python for Beginners?
Please give an example code that you don't understand.
0
condtional statements can either be true or false. It is false by defsult.
example:
if x>5:
print('greater than 5')
will print if x is greater than 5
chaining them with boolean operators (and, or, not) allows you to create more complex conditions.
example:
if x>5 and x<10:
print('between 5 and 10')
restricts the condition with another condition. Now it needs two condtions to be true before it evaluates to true.
0
Ausgrindtube i know about chained statements , nested loops. I don't understand his question.
0
Looking at the thread, one of my answers was marked as "best answer" so it seems like the question has been answered.
Don't sweat it Abhimanyu
- 1
Still don't understand