Last answered:

19 Apr 2022

Posted on:

30 Mar 2022

0

Question about exercise - if statement

Hi,

wondering about second if statement in the exercise, it says 'Let the second one print "At least one of the conditions is false" if x is less than or equal to 3 andy is less than or equal to 13.' - reading this i understand the code should be:

if x <= 3 and y <= 13:

in such case the if statement will only be true when both conditions are met. But the print message of the second if statement is 'At least one of the conditions is false' which suggests there should be or rather than and in between, and so it is in the solution.

Am i overthinking it or just misunderstood the instruction?

Best,
Greg

1 answers ( 0 marked as helpful)
Instructor
Posted on:

19 Apr 2022

0

Hi Grzegorz!
Thanks for reaching out.
If the two statements are true, the first message will be printed. If one of the two statements is true then the second message will be printed.

Hope this helps.
Best,
Tsvetelin

Submit an answer