+ 1
I don't understand the last question
If not 1+1=y or x=4 and 7âș8
4 Answers
+ 1
Thanx for your answer @Fianu Dovlo
But you say that "False and True = True " it equal false not True ...
+ 1
The first part asks, If not 1+1=y, means 1+1 doesn't equal y, which is False because y is 2. So 1+1 is 2.
Then the second part asks if x==4, this is True because x is 4.
Since it is an "or" statement between the two equations( not 1+1=y or x==4), only one has to be True in an or statement, thus gets a True.
True or True = True
True or False = True
False or True = True
False or False = False
The final equation asks if 7==8(or 7>8), which it isn't so it's False.
Since the first set of equations eventually come out as True but the last one comes out as False, the entire line is False.
You learn earlier that for a statement with "and", the entire equation has to be True. The final equation( 7>8 whichever showed up for you 7==8 ) makes the whole thing False.
True and True = True
True and False = False
False and True = False *corrected
False and False = False
That makes the first print command invalid so it goes to the elif, which asks whether x > y, which it True, so "No" is printed.
+ 1
Yes. Sorry, you're right. Was typing fast and made a lot of edits so ended up being a little sloppy.
+ 1
Thanx for your reply đđ