0

Python, 22.1 Chaining Mutliple Conditions question is wrong?

In the chaining multiple conditions question, I ran the code in the question through an online IDE and got the wrong answer. I got yes instead of no. Can someone please explain how the answer is no? x = 4 y = 2 if not 1/1==y or x==4 and 7==8: print("yes") elif x>y: print("no")

17th Oct 2021, 11:48 PM
Mohammed
1 Answer
+ 1
both conditions are true 1/1 not equal to y x grater then y If multiple conditions become True , then the first block will be executed.
18th Oct 2021, 12:19 AM
ubai
ubai - avatar