- 2
Why the output is just 3? Why not 7 as well??
4 Answers
+ 4
# This is about the last quizz of the if-statement Python course :P
num = 7
if num > 3:
print("3") # you're ok this print 3?
if num < 5: # 7 is not < 5, so next code isn't executed, because indented inside this condition ^^
print("5')
if num == 7: # the condition is true, but is not run ;)
print("7") # so no more this instruction is executed....
+ 3
??
0
You aren't showing us any code, we can't really help unless we know what's happening.