0

At Boiling Point! Question

The answer to this question is temp = float(input()) if temp >= 100: print("Boiling") However if you run the same script but without : after the 100 why does it give an error? (example below) temp = float(input()) if temp >= 100 print("Boiling") ERROR

14th Mar 2022, 2:06 PM
DirtyWizard
DirtyWizard - avatar
2 Answers
+ 4
It's a syntax for if statement. Like you use parenthesis for print statement.
14th Mar 2022, 2:12 PM
Simba
Simba - avatar
+ 1
Ahh okay thank you Simba, that makes sense now 🙂
14th Mar 2022, 2:13 PM
DirtyWizard
DirtyWizard - avatar