1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blondinia [14]
3 years ago
13

Python: Write a program for a small restaurant that sells pizzas. You may consider it as a prototype of a realistic online appli

cation. Basically, your program allows a user to enter one’s name and information about pizzas that the user wants to order. It then calculates and displays the subtotal, sales tax, and total cost of the order.
Given below is a typical dialog between a user and your program when the user interacts with your program to place an order of one or more pizzas. Note that the text in black is program output, such as asking the user for certain input or displaying relevant information for the user, and the text in red is the user’s response to a prompt from your program.

Enter your name: John

Enter the number of pizzas you want to order: 2

Pizza Size and Cost

- Small (10 inch, $7.95), Medium (12 inch, $9.95), and Large (14 inch, $11.95) Enter the size of your pizzas: Medium

Available Topping and Cost Per Topping

- Ham, Mushrooms, Onions, Green Peppers, Black Olives, Tomatoes, Pineapple, Spinach

- $0.75 each for Small Pizza, $0.95 each for Medium Pizza, and $1.15 each for Large Pizza Enter the number of toppings on your pizzas: 3

Enter your choices of toppings: Onions, Pineapple, Spinach

Order Summary

Customer name: John

2 Medium Pizzas with Toppings Onions Pineapple Spinach

Subtotal:

Sales Tax (6.0%): Total Cost:

$22.15 $1.33 $23.48

Develop your program according to the dialog above.
Computers and Technology
1 answer:
katrin2010 [14]3 years ago
7 0

Answer:

Name: tyler

Number of pizzas: 2

Small (10 inch, $7.95), Medium (12 inch, $9.95), and Large (14 inch, $11.95)

Pizza size: large

Available toppings: Ham, Mushrooms, Onions, Green Peppers, Black Olives, Tomatoes, Pineapple, Spinach

$0.75 each for Small Pizza, $0.95 each for Medium Pizza, and $1.15 each for Large Pizza

Number of toppings: 2

Enter topping number 1: ham

Enter topping number 2: onions

Order Summary:  

Customer Name: tyler

2 large pizzas with ['ham', 'onions']        

Subtotal | Sales Tax (6%) | Total Cost        

26.2 | 1.5719999999999998 | 27.772

Explanation:

name = input("Name: ")

num_pizzas = int(input("Number of pizzas: "))

print("Small (10 inch, $7.95), Medium (12 inch, $9.95), and Large (14 inch, $11.95)")

pizza_size = input("Pizza size: ").lower()

print("Available toppings: Ham, Mushrooms, Onions, Green Peppers, Black Olives, Tomatoes, Pineapple, Spinach")

print("$0.75 each for Small Pizza, $0.95 each for Medium Pizza, and $1.15 each for Large Pizza")

num_toppings = int(input("Number of toppings: "))

toppings = []

subtotal = 0

tax = 0

total = 0

for i in range(1,num_toppings + 1):

   toppings.append(input(f"Enter topping number {i}: "))

if pizza_size == 'small':

   subtotal += num_pizzas * 7.95

   subtotal += num_toppings * 0.75

   tax += subtotal * 0.06

   total += subtotal + tax

   print("Order Summary: ")

   print(f"Customer Name: {name}")

   print(f"{num_pizzas} {pizza_size} pizzas with {toppings}")

   print("Subtotal | Sales Tax (6%) | Total Cost")

   print(f"{subtotal} | {tax} | {total}")

if pizza_size == 'medium':

   subtotal += num_pizzas * 9.95

   subtotal += num_toppings * 0.95

   tax += subtotal * 0.06

   total += subtotal + tax

   print("Order Summary: ")

   print(f"Customer Name: {name}")

   print(f"{num_pizzas} {pizza_size} pizzas with {toppings}")

   print("Subtotal | Sales Tax (6%) | Total Cost")

   print(f"{subtotal} | {tax} | {total}")

if pizza_size == 'large':

   subtotal += num_pizzas * 11.95

   subtotal += num_toppings * 1.15

   tax += subtotal * 0.06

   total += subtotal + tax

   print("Order Summary: ")

   print(f"Customer Name: {name}")

   print(f"{num_pizzas} {pizza_size} pizzas with {toppings}")

   print("Subtotal | Sales Tax (6%) | Total Cost")

   print(f"{subtotal} | {tax} | {total}")

You might be interested in
An indention where the first line of text is indented and the second and succeeding lines start at the left margin is called ___
iren [92.7K]

Answer:

first-line indent

Explanation:

The answer is -- first-line indent

The "first-line indent" is a guideline provided by the APA or American Psychological Association for formatting or writing a reference page.

When we start writing text in a page, the first line on our page will line up from the left margin of the page and each line after that is the second and the succeeding lines will also start lining up at the left margin of the page when first line intend is turned on. This is called first-line indent.

Thus the answer is  first-line indent

4 0
3 years ago
Describe Relational Query Languages and Operations.
Lelechka [254]

Answer:

Relational query language is the language that is used in the queries of the relational databases that has rows and columns in table. The user or client presents a request for gaining the information from the database. The relationships in the database are defined in numerous ways which creates the query.

This language can be procedural form or non-procedural form.The operations performed by this language are communication with the relational database, analyzing the relationships between the entities of database,splitting the request from client and then execution of that request is done by database management system(DBMS), etc.

7 0
3 years ago
What distinguishes Accenture’s Cloud capabilities from our competitors?
harina [27]

The things that differentiate Accenture’s Cloud capabilities from other competitors is allowing clients to choose the location, memory, and speed of the devices that they want to use.

Cloud computing refers to the delivery of several services through the internet. They're the tools and the applications like servers, databases, software, networking, etc.

Accenture’s Cloud capabilities are different from other competitors as it allows clients to choose the location and speed of the services that they want to enjoy.

Also, Accenture’s Cloud capabilities enable clients to host Cloud services using their own on-premise infrastructure.

Red related link on:

brainly.com/question/25557420

6 0
2 years ago
whenever I try to make an account it says it can't sign me up at this time or something- can you help?-
Rus_ich [418]

Answer:

You can try emailing tech support and describing your issue. In order to get the best help as quickly as possible, try providing screenshots of what happens when you sign in or describe everything you see on the screen when the problem occurs, and quote error messages directly when possible.

5 0
3 years ago
What stage of software development incorporates planning to help make changes in the project plan based of reviews
larisa86 [58]

Answer:

A

Explanation:

8 0
3 years ago
Other questions:
  • kevin is working on a financial project that involves a lot of statistical information. He needs software that allows him to ent
    8·2 answers
  • How many unique ip addresses can be made in a fixed-length ip address system using 6 bits?
    8·1 answer
  • If you “bury” a story on Digg, what have you done
    10·1 answer
  • What lets you do many things, like write book reports and stories?
    15·1 answer
  • Discuss trends in cellular data transmission speeds
    15·2 answers
  • Which osi/iso layer is responsible for determining the best route for data to be transferred?
    5·1 answer
  • Unemployment can be viewed as
    14·1 answer
  • Why is yo utu be down?<br> (You restrict talking about yo utu be, really)
    11·2 answers
  • How to deactivate the brainly account?​
    13·1 answer
  • The Synonyms submenu offers a list of synonyms for a word. Is it always a good idea to use whatever synonyms are presented on th
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!