Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help to write this in Python with TDD. Write a program that will read a file with airport codes. For example, the file may

Please help to write this in Python with TDD. 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

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

Step: 3

blur-text-image

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago