+ 2
I am not understanding why this code given below should have '3' as the solution. This is the code though
num = 7 if num > 3: print("3") if num>5: print("5") if num == 7: print("7") This question also occured in one of the quizzes and it would be great help if anyone coud explain me this. Thanks :)
2 Answers
+ 9
Is that so!
You will get '3' '5' '7' has the output since all the conditions will result true.
Error in the line 6th line it isn't intended
+ 3
7>3,prints 3
Then 7>5,prints 5
Then 7==7,prints 7