+ 2
no output
num=7 if num==3: print("3") if num<5: print("5") if num==7: print("7") Why this code giving no output? please help!
3 Answers
+ 4
First if condition is false so noting below that will be executed.
If you want to execute indent your code properly.
Hope it will help.
Happy coding.
+ 1
....because if statement's are nested inside the first statement...... (if num==3)... if you want to get output use either else if statement or indent if statements properly...