Social Sciences, asked by chandeepsingh0004, 6 months ago

correct the following code
temperature = input("TEMPERATURE: ")
if temperature > 90:
print " It is hot outside."​

Answers

Answered by yamanjaikumar
2

Explanation:

temperature = int (input ("temperature"))

if (temperature > 90) :

print ("it is hot outside")

input func takes input as a string type by default. so you've to use the type converter int() to change that value to integer, which can then be compared with 90.

if you don't want to use int(), then you've to compare temperature with "90"

(temperature > "90") ie with string type.

keep the indentation right.

Similar questions