portablejim

A1

Feb 25th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. Inspired by the success of the Mount Panorama Motor Racing Circuit, International Motor Sports Authority (IMSA) has recently built a motor racing circuit on Mount Everest that will be the most challenging and thrilling motor racing event on earth. Mount Everest Motor Racing Circuit (MEMRC) has the following types of tickets and prices.
  2.  
  3.  
  4. Table 1: Ticket Type and Price
  5. -------------------------------------
  6. Ticket Type Price
  7. -------------------------------------
  8. General Admission $90
  9. Reserved Grandstand Seating $150
  10. The Precinct $250
  11. Lunch Packages on Everest $350
  12.  
  13. IMSA employs you to build a Ticket Management System (TMS) so that their Ticket Officers can easily compute the prices of various tickets sold.
  14.  
  15. Write a program in Python that will ask a Ticket Officer for the number of tickets sold for each type of tickets one by one. That is, it will first ask a Ticket Officer “Please enter the number of tickets sold for General Admission”. Once the Ticket Officer enters the number of tickets sold for General Admission it will then ask “Please enter the number of tickets sold for Reserved Grandstand Seating” and so on. Finally, the program will compute and display the total sale amount for each ticket type, and then the combined total cost of all tickets.
  16.  
  17. A typical example of the display of your program can be as follows. Your program MUST follow the same display style.
  18. ----------------------------------------------------------------------------------------------
  19. Mount Everest Motor Racing Circuit (MEMRC)
  20. -----------------------------------------------------------------------------------------------
  21. Please enter the number of tickets sold for General Admission: 100
  22. Please enter the number of tickets sold for Reserved Grandstand Seating: 70
  23. Please enter the number of tickets sold for The Precinct: 15
  24. Please enter the number of tickets sold for Lunch Packages on Everest: 5
  25.  
  26. Thank You!
  27.  
  28. The sale amount of tickets for General Admission (in dollars): 9000
  29. The sale amount of tickets for Reserved Grandstand Seating (in dollars): 10500
  30. The sale amount of tickets for The Precinct (in dollars): 3750
  31. The sale amount of tickets for Lunch Packages on Everest (in dollars): 1750
  32.  
  33. The total sale amount: 25000
  34.  
  35. Good Bye.
  36.  
  37.  
  38.  
  39. Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some examples of pseudocode can be found at http://www.unf.edu/~broggio/cop2221/2221pseu.htm.
  40.  
  41. Select 3 sets of test data that will demonstrate the ‘normal’ operation of your program: that is test data that will demonstrate what happens when VALID input is entered. Select another 2 sets of test data that will demonstrate the “abnormal” operation of your program. Set it out in a tabular form: the test data, the reason it was selected, the output expected as a result of using that test data, and finally leave space to record the output actually observed when the test data is used.
  42.  
  43. Implement your algorithm in Python. Comment your code as necessary to explain it clearly.
  44.  
  45. Run your program using the test data you have selected and save the output it produces in a text file.
Advertisement
Add Comment
Please, Sign In to add comment