subject

The following (unfinished) program implements a digital line queuing system for an amusement park ride. The system allows a rider to reserve a place in line without actually having to wait. The rider simply enters a name into a program to reserve a place. Riders that purchase a VIP pass get to skip past the common riders up to the last VIP rider in line. VIPs board the ride first. (Considering the average wait time for a Disneyland ride is about 45 minutes, this might be a useful program.) For this system, an employee manually selects when the ride is dispatched (thus removing the next riders from the front of the line).Complete the following program, as described above. Once finished, add the following commands:The rider can enter a name to find the current position in line. (Hint: Use the list. index() method.)The rider can enter a name to remove the rider from the line. riders_per_ride = 3 # Num riders per ride to dispatchline = [] # The line of ridersnum_vips = 0 # Track number of VIPs at front of linemenu = ('(1) Reserve place in line.\n' # Add rider to line '(2) Reserve place in VIP line.\n' # Add VIP '(3) Dispatch riders.\n' # Dispatch next ride car '(4) Print riders.\n' '(5) Exit.\n\n')user_input = input(menu).strip().lower()while user_input != '5': if user_input == '1': # Add rider name = input('Enter name:').strip().lower() print(name) line. append(name) elif user_input == '2': # Add VIP print('FIXME: Add new VIP') # Add new rider behind last VIP in line # Hint: Insert the VIP into the line at position num_vips. #Don't forget to increment num_vips. elif user_input == '3': # Dispatch ride print('FIXME: Remove riders from the front of the line.') # Remove last riders_per_ride from front of line. # Don't forget to decrease num_vips, if necessary. elif user_input == '4': # Print riders waiting in line print('%d person(s) waiting:' % len(line), line) else: print('Unknown menu option') user_input = input('Enter command: ').strip().lower() print(user_input)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
question
Computers and Technology, 24.06.2019 09:00
Technician a says that a new replacement part is always good. technician b says that sometimes recent repair work will be the cause of a complaint. who is correct? a. both technicians a and b b. technician a c. technician b d. neither technician a nor b
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers.txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even.txt and the odd numbers to a file named odd.txt.
Answers: 3
You know the right answer?
The following (unfinished) program implements a digital line queuing system for an amusement park ri...
Questions
question
Mathematics, 04.10.2019 21:40
question
Computers and Technology, 04.10.2019 21:40
question
Health, 04.10.2019 21:40