Answer:
The solution code is written in Python 3.
- temp = int(input("Enter current temperature (Fahrenheit): "))
-
- while(temp < 270):
- temp = int(input("Enter current temperature (Fahrenheit): "))
-
- if(temp > 330):
- print("You burned the taffy!")
- else:
- print("Your taffy is ready for the next step")
Step-by-step explanation:
Firstly, we can try to get a first temperature reading (Line 1)
if the first reading is smaller than 270, keep prompting user for the next reading using while loop (Line 3 - 4)
if the input temperature is bigger or equal to 270, the program will exist the while loop and proceed to check if the final temperature reading is bigger than 330 to determine an appropriate message to display (Line 6 - 9).