write a program to accept a temperature and tell whether water will be in solid, liquid or gaseous state
Answers
Answered by
0
Answer:
Temp < 0 then Freezing weather
Temp 0-10 then Very Cold weather
Temp 10-20 then Cold weather
Temp 20-30 then Normal in Temp
Temp 30-40 then Its Hot
Temp >=40 then Its Very Hot
Answered by
15
choice = "Yes"
while choice == "Yes":
temp = float(input("Enter a temperature [in degree celsius]: "))
if temp > 0:
print("The water will be at Solid state.")
elif temp < 0 or temp < 100:
print("The water will be at Liquid state.")
elif temp > 100:
print("The water will be at Gaseous state.")
print()
print("Would you like to test out with more temperatures?")
print("Yes/No")
choice = input()
I've used a while loop as well, in case the user would like to try out with more temperatures.
Similar questions
Social Sciences,
4 months ago
Computer Science,
4 months ago
English,
8 months ago
English,
11 months ago
Math,
11 months ago
Biology,
11 months ago