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 My answer temp = int(input()) if temp >= 100: print (temp("Boiling")) else: print ("The water is not boiling") There is something wrong about my answer
1/23/2021 3:01:30 PM
Darkchocoo3 Answers
New AnswerIndentation issue. temp = int(input()) if temp >= 100: print('Boiling'); else: print('Not boiling');
Firstly, `temp` is not the name of a function. Why are you calling it on line 4? The `temp` on that line is just wrong and useless. Secondly, you need indentation in if statements. See here how to use if-statements again (especially read the yellow box on page 1) https://www.sololearn.com/learning/2277/
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message