Question: Write Python program that will manage seat reservations for a plane trip. The (in)famous Boening 737 in standard configuration has 37 rows (numbered 1 -
Write Python program that will manage seat reservations for a plane trip. The (in)famous Boening 737 in standard configuration has 37 rows (numbered 1 - 38) of seats. Each row having 6 seats labeled by letters A, B, C, D ,E, F. (for simplicity we will assume that there is only economy class).
Your program should keep the reservations in a dictionary with keys being seats locations and values being the names of passengers that reserved a given seat or a string "no one" if the seat is available. Notice, that each key need to have two elements, one indicating the row (an integer number) and the second indicating location of the seat in the row (a letter).
Your program should allow many people to make reservations. It should ask each customer for the row number and seat location and then check if the seat is taken or not. If the seat is available you need to ask for customer name and update the dictionary and display confirmation message for customer. If the seat is already taken you should display appropriate message to customer and let them choose another seat.
After all customers made their reservations your program should display the reservations, one per line somewhat like this:
1 A: George Washington
1 B: no one
1 C: John Adams
1 D: Thomas Jefferson
and so on.
BTW. There is no row 13 on planes.
-------------------------------------------------------------------------------------------------------------
REMEMBER ITS PYTHON FOR BEGINNERS BE AS SUMPLE AS POSSIBLE
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
