Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

marking scheme below Problem 1 (Taking Orders) Write a program called a2q1.py that creates a text-based purchasing system for Dino's International Doughnut Shoppe. For this

image text in transcribed
image text in transcribed
marking scheme below
image text in transcribed
Problem 1 (Taking Orders) Write a program called a2q1.py that creates a text-based purchasing system for Dino's International Doughnut Shoppe. For this first part, you'll build a menu system that allows customers to purchase quantities of a single type of doughnut. The program should start by asking the customer for their name. Next it should display a menu that asks the user to select one of the following 4 kinds of doughnuts 1. Chocolate-dipped Maple Puff ($3.50 each) 2. Strawberry Twizzler ($2.25 each) 3. Vanilla Chai Strudel ($4.05 each) 4. Honey-drizzled Lemon Dutchie ($1.99) The user should make their selection by entering the corresponding number. You can assume the user will enter an integer number, but must verify that it is a valid input (i.e., in the range 1-4). Once the customer has selected a variety, the program should ask how many of that variety the customer would like. Again, you can assume that a number is entered but must ensure it is a valid value (e.g., 0 or more). Following this, the program should provide the user with their receipt (report the type, quantity, and total cost of the user's order). Dino has made a special request that when telling the customer their order's cost that the program be personable and use the customer's name Below is a sample run of the program that demonstrates how your output could look (user input is highlighted for emphasis) python a2ql.py Welcome, to Dino's International Doughnut Shoppe! Please enter your name to begin: Andrew Please select a doughnut from the following menu: 1. Chocolate-dipped Maple Puff ($3.50 each) 2. Strawberry Twizzler ($2.25 each) 3. Vanilla Chai Strudel ($4.05 each) 4. Honey-drizzled Lemon Dutchie ($1.99) I 'm sorry, that's not a valid selection. Please enter a selection from 1-4. Please select a doughnut from the following menu: 1. Chocolate-dipped Maple Puff ($3.50 each) 2. Strawberry Twizzler ($2.25 each) 3. Vanilla Chai Strudel ($4.05 each) 4. Honey-drizzled Lemon Dutchie ($1.99) How many Chocolate-dipped Maple Puffs would you like to purchase? 12 Andrew, here is your receipt: 12 Chocolate-dipped Maple Puffs Total cost: $42.00. Thank you, have a nice day! Part 1 1/10] 1 mark - Request and store the user's 1 mark - Menu of doughnuts is 1 mark - User's doughnut selection is 2 marks - Bad selections cause the 1 mark - Request and store the user's 1 mark - A personalized receipt is 1 mark - Selected doughnut and 2 marks - Correctly calculates and name correctly displayed requested and stored menu to repeat quantity of purchase displayed quantity are displayed in the receipt displays the total price

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions