Question: Your task is to create a program that lets students reserve a room in the building, finish using a room ( i . e .

Your task is to create a program that lets students reserve a room in the building, finish using a room (i.e. mark it available), check the status of a room, and see all of the rooms in the building (regardless of availability).
Show the user a main menu with five options: Reserve a room. Finish using a room (i.e., mark it as available). Check the status of a room. View all rooms in the building, regardless of availability. Exit.
The user can go through options 14 as many times as they want until they choose to exit. If they choose to reserve a room Ask which room they would like to reserve. Pass in the appropriate status variable to the reserve_room function and store the result in the same status variable. For example, if the user wants to reserve the auditorium, the function call line would be auditorium_status = reserve_room(auditorium_status).
The reserve_room function should print a confirmation message and return booked as a string. If they choose to finish using a room Ask which room they finished using. Pass in the appropriate status variable to the done_with_room function and store the result in the same status variable. For example, if the user wants to finish using the auditorium, the function call line would be auditorium_status = done_with_room(auditorium_status).
The done_with_room function should print a confirmation message and return available as a string. If they choose to check the status of a room Ask which room they would like to check. Pass in the appropriate status variable to the check_room_status function. Use the return value directly in a print() in main. For example, if the user wants to check the auditorium, the function call line would be print(check_room_status(auditorium_status)).
The check_room_status function should return a string stating whether the room is available or booked, based on the status that was passed in. If they choose to view all rooms Use a for loop to print each room in the listofrooms list. If they choose to exit Print a short thank you message and let the program end.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!