Computers and Technology

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)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, adam4449
Jackson is teaching the decimal number system. he wants his students to know how to expand numbers by powers of 10. which is the correct order in which digits are assigned values in the decimal number system?
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, achsahjosey
This isn't about school but every time it tells me to watch an ad to unlock the answer to a question it prompts a survey and it just keeps loading. so i haven't been able to get answers for my tests in like a week.
Answers: 2
image
Computers and Technology, 24.06.2019 17:00, kappy10
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
Answers: 1
image
Computers and Technology, 24.06.2019 20:30, anonymous1813
⭐️⭐️⭐️ what network is larger in size? man or wan? you ⭐️⭐️⭐️
Answers: 2
Do you know the correct answer?
The following (unfinished) program implements a digital line queuing system for an amusement park ri...

Questions in other subjects:

Konu
Mathematics, 20.04.2021 18:00
Konu
Mathematics, 20.04.2021 18:00
Konu
Mathematics, 20.04.2021 18:00