Question: Please keep these as basic as possible so that I can understand and follow how it was done. 3. Write a program named TemperaturesComparison that
Please keep these as basic as possible so that I can understand and follow how it was done.
3. Write a program named TemperaturesComparison that allows a user to input five daily Fahrenheit temperatures that must range from ?30 to 130; if a temperature is out of range, require the user to reenter it. If no temperature is lower than any previous one, display a message Getting warmer. If every temperature is lower than the previous one, display a message Getting cooler. If the temperatures are not entered in either ascending or descending order, display a message It?s a mixed bag. Finally, display the temperatures in the order they were entered, and then display the average of the temperatures.
The results should look like this:



C: C:\WINDOWS\system32\cmd.exe Enter temperature 1 >> 70 Enter temperature 2 >> 68 Enter temperature 3 >> 66 Enter temperature 4 >> -40 Out of range -- please reenter. Enter temperature 4 >> 64 Enter temperature 5 >> 62 Getting cooler: 70 68 Press any key to continue. 66 . 64 62 C: C:\WINDOWS\system32\cmd.exe Enter temperature 1 >> 88 Enter temperature 2 >> 90 Enter temperature 3 >> 92 Enter temperature 4 >> 200 Out of range please reenter. -- Enter temperature 5 >> 96 Getting warmer: 88 90 Press any key to continue. Enter temperature 4 >> 94 92 94 96 0:4. C:\WINDOWS\system32\cmd.exe Enter temperature 1 >> 88 Enter temperature 2 >> 78 3 >> 79 4 >> 84 Enter temperature Enter temperature Enter temperature 5 >>76 It's a mixed bag: 88 Press any key to continue 78 79 84 76
Step by Step Solution
3.52 Rating (149 Votes )
There are 3 Steps involved in it
Certainly Heres a simple Python progra... View full answer
Get step-by-step solutions from verified subject matter experts
