Can you help me on If Statement? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can you help me on If Statement?

Write a program that checks if the water is boiling. Take the integer temperature in Celsius as input and output "Boiling" if the temperature is above or equal to 100. Sample Input 105 Sample Output Boiling Do not output anything if the water is not boiling. Here is my attempt: temp = int(input()) if temp >= 100: print("boiling") ("boiling")

18th Nov 2021, 8:04 AM
Shah Johan
1 Answer
+ 4
Fix identation, and remove last ("boiling") temp = int(input()) if temp >= 100: print("boiling")
18th Nov 2021, 8:12 AM
PanicS
PanicS - avatar