Hot chocolate should be nice and warm, but not so much that it burns your mouth. The perfect temperature is between 115°F and 130°F. Write a function with the name hot_chocolate that takes in a temperature as an argument.
The temperature will be a number such as 116.5, 130.0, 40, or similar. These represent Fahrenheit numbers. Return a string describing what the hot chocolate is like: If the temperature is below or exactly 32, return exactly: Your hot chocolate is ice chocolate. If the temperature is above 32 and below 115, return exactly: Your hot chocolate has become plain chocolate. If the temperature is 115-130 (including 115 and 130), return exactly: Your hot chocolate is ready to drink! If the temperature is above 130, return exactly: Your hot chocolate is too hot. Wait a bit.
I put this in def hot_chocolate(temp): if temp <= 32: return "Your hot chocolate is ice chocolate." elif temp > 32 and temp < 115: return "Your hot chocolate has become plain chocolate." elif temp >= 115 and temp <= 130: return "Your hot chocolate is ready to drink!" else: return "Your hot chocolate is too hot. Wait a bit."
But I keep getting this back from the program every time I try to run it.
File "/home/hot_chocolate.py", line 4, in if hot_chocolate > 32 and hot_chocolate < 115: TypeError: '>' not supported between instances of 'function' and 'int'