- It Has Been Shown That The Best Temperature For Drinking Tea Is 150 Degrees Fahrenheit Very Often When Heating Water F 1 (45.29 KiB) Viewed 25 times
It has been shown that the best temperature for drinking tea is 150 degrees Fahrenheit. Very often, when heating water f
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
It has been shown that the best temperature for drinking tea is 150 degrees Fahrenheit. Very often, when heating water f
It has been shown that the best temperature for drinking tea is 150 degrees Fahrenheit. Very often, when heating water for tea, the temperature becomes higher than 150. In this case, ice chips can be incrementally added to reduce the water's temperature. Write a function named teaTimer that receives an integer temperature as a parameter. The function checks the temperature, if the temperature > 150, then a number of ice chips are incrementally added until temperature <= 150. Assume that each ice chip would lower the water's temperature by 2%. The function returns the minimum number of ice chips needed to make temperature <= 150 Note: the function returns -1 if the initial value of temperature < 150 Here's a walkthrough example. Suppose that temperature = 159 159 <= 150 is False Adding one ice chip would reduce the temperature to 155.82 155.82 <= 150 is False Adding a second ice chip would reduce the temperature to 152.7036 152.7036 <= 150 is False Adding a third ice chip would reduce the temperature to 149.649528 149.649528 <= 150 True Hence, three ice chips are needed to reach an optimal tea temperature Function header: teaTimer (temperature): Parameters: temperature (float) Return value: the time (in seconds) taken to lower the temperature of the cup of tea to the optimal drinking temperature. Return value type: int