Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Checkpoint B For Checkpoint B, you will extend your code from Checkpoint A by calculating the WCT for several locations. For that purpose, you will

Checkpoint B

For Checkpoint B, you will extend your code from Checkpoint A by calculating the WCT for several locations. For that purpose, you will need to:

  • Prompt the user to enter the number of locations for which WCT will be calculated.
    • If a user inputs a zero or a negative value for 'number of locations' then print a message and exit (see samples below).

Thereafter, you will print the following summary statistics, using the user's requested decimal precision:

  • Print the average WCT collected across all locations.
  • Print the location with the lowest WCT.
  • Print the average air temperature collected across all locations.
  • Print the location with the lowest air temperature.
  • Print the average wind velocity collected across all locations.
  • Print the location with the highest wind velocity.

Sample Output

Sample input/output behavior for Checkpoint B are provided below. Your program's spacing, spelling, capitalization, and punctuation will need to match the sample output EXACTLY for this project. To some degree, you can also sanity-check your program using the WCT table published by the NWS, above.

HINT: float('inf') is larger than every other float, and float('-inf') is smaller than any ever float. You may find these useful as variable initializers, when you are tracking minima and maxima.

HINT: The exit() function in the sys library can be used to halt the program running and report an exit code back to the operating system. Please use exit(-1), which will report it as an error. `

Note: This project outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs.


Sample Output 1

==> Windchill Temperature (WCT) Weather Report Calculator <== Select decimal precision for the report [1--4]: 4 Select the number of locations for the report: 3 Enter name of ** Location 1 **: Library Enter air temperature [in deg F]: -20 Enter wind velocity [in mph]: 60 WCT is -61.9819 deg F. Enter name of ** Location 2 **: Airport Enter air temperature [in deg F]: -30 Enter wind velocity [in mph]: 40 WCT is -70.5531 deg F. Enter name of ** Location 3 **: Town Hall Enter air temperature [in deg F]: -40 Enter wind velocity [in mph]: 5 WCT is -57.4923 deg F. *** Summary *** WCT Avg recorded WCT: -63.3424 deg F Location with lowest WCT: Airport (-70.5531 F) Air Temperature Avg recorded air temperature: -30.0000 deg F Location with lowest air temperature: Town Hall (-40.0000 F) Wind Velocities Avg recorded wind velocity: 35.0000 mph Location with highest wind velocity: Library (60.0000 mph) 

Sample Output 2

==> Windchill Temperature (WCT) Weather Report Calculator <== Select decimal precision for the report [1--4]: 2 Select the number of locations for the report: 0 Error: 0 is not a valid input. 
python please

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

Write a note on Organisation manuals

Answered: 1 week ago

Question

Define Scientific Management

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago