Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 3(10pt): Sushi restaurant Ashwin opened a sushi restaurant in Seattle. Each sushi piece is $1.99. His restaurant offers a student discount depending on the
Question 3(10pt): Sushi restaurant Ashwin opened a sushi restaurant in Seattle. Each sushi piece is $1.99. His restaurant offers a student discount depending on the number of pieces they eat. Quantity Discount 10 - 19 20 - 49 50 - 99 100 or more 10 % 15% 20 % 25 % Write a program that asks the number of sushi pieces eaten and compute the total price. Be sure to have an input validation. The value entered should be greater than 0. If not, print "Invalid input". The total price should be formatted with a two-digit precision as shown below. Expected output 1 (bold is user input) Enter the number of sushi: Total price: $5.97 Expected output 2 (bold is user input) Enter the number of sushi: -7 Invalid input Expected output 3 (bold is user input) Enter the number of sushi: 23 Total price: $38.90
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started