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, 24.06.2019 01:30
How would you cite different books by the same author on the works cited page? moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. –––. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. –––. folk songs and ballads. salem: poetry press, 1999. print.
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
You know the right answer?
The following (unfinished) program implements a digital line queuing system for an amusement park ri...
Questions
question
Social Studies, 22.09.2019 08:00
question
Mathematics, 22.09.2019 08:00
Questions on the website: 13722363