+ 19
Why in the case 01 the output prints both the order and the quiz tells that only the first line is printed because the other.
6 Réponses
+ 19
Thanks anyway Random Coder !¡
But you have to consider that I changed the source code to be the same as in the quiz, and I get different output, and there are no comparisons in the comments !¡
+ 18
Vucko again, :) because on the question line above does not give enough space for a man to put quality questions. GIVE MORE SPACE FOR MORE CHARACTERS . Anyway, this is just an example of a code and does not work but check what I'm talking about.
+ 3
because the if statement for seven is inside the if statement for 5 which is not true and so it doesnt run
+ 2
https://code.sololearn.com/cwteM3r4iueC/?ref=app I don't know python, so cant't answer your question, but here is fixed code and there is question in it. Maybe people will understand your question better with fixed code :p
+ 2
:p
+ 2
It's due to the nested "if"'s in the code. When an "if" statement runs it checks if the condition is true. if the condition is true then it completes the subroutine.
in the case 01 example you can see that the argument is true in the first case. So it runs the subroutines "print" and the next "if" which is also true so it runs it's subroutines as well.
In the quiz example the first "if" statement is true, so it prints and runs the next "if". This "if" however, returns false. So it exits the subroutine.