Mar-06-2017, 01:56 AM
Newton’s Law of Cooling states that when a hot liquid is placed in a cool
room, each minute the decrease in the temperature is approximately proportional
to the difference between the liquid’s temperature and the room’s temperature.
That is, there is a constant k such that each minute the temperature loss is
k # (liquids temperature - rooms temperature). Suppose a cup of 212°F coffee is
placed in a 70°F room and that k = .079. Determine the number of minutes required
for the coffee to cool to below 150°F.
room, each minute the decrease in the temperature is approximately proportional
to the difference between the liquid’s temperature and the room’s temperature.
That is, there is a constant k such that each minute the temperature loss is
k # (liquids temperature - rooms temperature). Suppose a cup of 212°F coffee is
placed in a 70°F room and that k = .079. Determine the number of minutes required
for the coffee to cool to below 150°F.
k = 0.79 room = 70 cup = 212 tempLoss = 0 minutes = 0 while (cup > 150): tempLoss = k*(cup - room) cup -= tempLoss minutes += 1 print("The coffee will cool to below 150 degrees in 7", minutes, "minutes")This keeps giving me 1 minute