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, 22.06.2019 03:20
Which of these is a benefit of social networking? oa. hiding your true identity from friendsob. avoiding talking to people in personoc. spending time with friends instead of studyingod. connecting with new people
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of β€œtag” to remember the meaning of contagious
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, 06.06.2020 23:57
question
Social Studies, 06.06.2020 23:57
question
Biology, 06.06.2020 23:57
Questions on the website: 13722359