Question: Please help to write this in Python. Write a program that will read a file with airport codes. For example, the file may contain: IAH
Please help to write this in Python.
Write a program that will read a file with airport codes. For example, the file may contain: IAH IAD SFO STL BOS MSP For each given airport code, the program will fetch the airport name, the city name, state name, temperature, and if there is a delay or not, from http://services.faa.gov/airport/status/{CODE}?format=application/json [replace {CODE} with an airport code, for example http://services.faa.gov/airport/status/IAH?format=application/json to get data for the airport code IAH] The program will print, in sorted order of city name (if two cities have the same name, then the data is further sorted on state name), the following details: city | state | airport code | airport name | temperature | delayed or --- (--- for no delay). The program will also print, below the table, one line Number of airport delays: # (where # is the actual number of delays). If for some reason the details for a airport could not be obtained, then the row for that should be shown with --- for all data that could not be obtained for that airport code (but the airport code itself will be displayed on the row). 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
