0
Why does this have no output?
5 Answers
+ 5
Put the "else" statepents inside the first "if" statement.
+ 4
The first if is not false, it is the second if that is false. Which means the else statement will be ignored whatever happened inside the first if.
Now let's go inside the first if, you are checking "x>9" which returns false, thus nothing is printed. And as mentioned before, the else statement will be ignored because the first if was already excuted.
+ 3
The first if catches rather x is true to 4
https://code.sololearn.com/csAkcNWaCMc6/?ref=app
+ 1
You have used if twice conseucatvly
0
Yes but why does it have no output since the first if is false