0
Is statement
Why does the following code only print the 3? Num = 7 If num > 3: Print (“3”) If num < 5: Print (“5”) If num == 7: Print (“7”)
3 ответов
+ 4
Read the comments in the code below. It should help.
https://code.sololearn.com/cSnguh075qYF/?ref=app
+ 2
You have a syntax error.
You’re missing ”:” after your if statements
+ 1
The if statement is basically testing each if statment one by one, it doesn't test all together. That is why it only prints 3 because that first if statment is true, then the code moves on