Can someone pls help me, I'm really confused | SoloLearn: Learn to code for FREE!

0

Can someone pls help me, I'm really confused

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

Darkchocoo

3 Answers

New Answer

+3

Indentation issue. temp = int(input()) if temp >= 100: print('Boiling'); else: print('Not boiling');

+3

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/

0

Thank youuu🙂