Enter destination name or Enter to quit San Francisco Enter flight's regular price 550 Enter reduction percent for sale 10 Enter item name or Enter to quit New Orleans Enter flight's regular price 330 Enter reduction percent for sale 10 Enter item name or Enter to quit Atlanta Enter flight's regular price 295 Enter reduction percent for sale 20 Enter item name or Enter to quit File was created
Can you please anser the following question. Program is in Python and has to look exactly like the example picture attached. Thank you!


Algorithm:
1. Create an empty dictionary to store the flight prices.
2. Create a loop to accept user input.
3. Within the loop, prompt the user to enter a destination name or quit.
4. If the user enters a destination name, prompt them to enter the regular price and reduction percent for the flight.
5. Store the destination name, regular price, and reduction percent in the dictionary.
6. Once the user is done entering information, create a file.
7. Iterate through the dictionary, writing the destination name, regular price, and reduction percent to the file.
8. Close the file.
9. Print a message indicating that the file was created.
Step by step
Solved in 4 steps with 2 images









