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 Answers
+ 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