Question: Create a header for your program just as you have in the past. Create a Python Application which asks the user for their zip code
Create a header for your program just as you have in the past.
Create a Python Application which asks the user for their zip code or city Your program must perform both a city and a zip lookup You must ask the user which they want to perform with each iteration of the program.
Use the zip code or city name in order to obtain weather forecast data from OpenWeatherMap.
Display the weather forecast in a readable format to the user. Do not display the weather data in Kelvin, since this is not readable to the average person. You should allow the user to choose between Celsius and Fahrenheit and ideally also Kelvin.
Use comments within the application where appropriate in order to document what the program is doing. Comments should add value to the program and describe important elements of the program.
Use functions including a main function and a properly defined call to main. You should have multiple functions.
Allow the user to run the program multiple times to allow them to look up weather conditions for multiple locations.
Validate whether the user entered valid data. If valid data isnt presented notify the user. Your program should never crash with bad user input.
Use the Requests library in order to request data from the webservice.
Use Try blocks to ensure that your request was successful. If the connection was not successful display a message to the user.
Use Python
Use try blocks when establishing connections to the webservice. You must print a message to the user indicating whether or not the connection was successful.
You must have proper coding convention including proper variable names See PEP
At a minimum your program should perform a current weather lookup and display the following: location the weather was retrieved for ie citystate current temp, feels like temp, low temp, high temp, pressure, humidity, and the current weather description ie clouds
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
