0

I can't pass this python level

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. Response: temp = (input()) if temp >= 100: print ("boiling") It answers me output: boiling Expected result: boiling

6th Aug 2022, 7:40 PM
Javier Ernesto La Rotonda
Javier Ernesto La Rotonda - avatar
2 ответов
+ 1
input() always returns as string. You need to convert it to a number if you want to compare it to a number.
6th Aug 2022, 7:56 PM
Lisa
Lisa - avatar
0
temp = int(input()) This should help you.....
6th Aug 2022, 7:57 PM
Jan
Jan - avatar