You have been asked to create a python program that will ask the user how many...

90.2K

Verified Solution

Question

Programming

You have been asked to create a python program that will ask theuser how many tickets the user would like to purchase forgraduation. The user will then choose the number of tickets neededand the program will list the cost of the tickets, a service fee,tax, and the total of the purchase.

Specifications:

  • The program should only accept whole numbers when receivinginput for the number of tickets needed.
  • No calculations should be performed if input is invalid.
  • No output should be displayed if input is invalid.
  • The service fee should be $2.50 per ticket.
  • The tax should be 3% of the cost of the tickets (without theservice fee).
  • The final cost (grand total) should be displayed with a dollarsign and two decimal places.

Answer & Explanation Solved by verified expert
4.1 Ratings (660 Votes)
Here is the codewhileTrue try numticket intinputHow many tickets you would like to    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students