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
sashaice [31]
3 years ago
5

And Python code for the following programming problem and the pseudo code below

Computers and Technology
1 answer:
lora16 [44]3 years ago
6 0

Answer:

endProgram = "no"

endOrder = "no"

totalBurger = 0

totalFry = 0

totalSoda = 0

total = 0

tax = 0

subtotal = 0

option = 0

burgerCount = 0

fryCount = 0

sodaCount = 0

def resetVariables():

    #reset variables

   totalBurger = 0

   totalFry = 0

   totalSoda = 0

   total = 0

   tax = 0

   subtotal = 0

def getBurger():

   global burgerCount

   burgerCount += int(input("Enter the number of burgers you want: "))

   totalBurger =burgerCount * .99

   return totalBurger

def getFry():

   global fryCount

   fryCount += int(input("Enter the number of fries you want: "))

   global totalFry

   totalFry +=fryCount * .79

   return totalFry

def getSoda():

   global sodaCount

   sodaCount += int(input("Enter the number of sodas you want: "))

   global totalSoda

   totalSoda +=sodaCount * 1.09

   return totalSoda

def calcTotal():

   global subtotal

   subtotal += totalBurger + totalFry + totalSoda

   global tax

   tax += subtotal * .06

   global total

   total += subtotal + tax

   return total

def printReceipt(total):

   print("Your total is $",round(total, 2))

#Loop to run program again

while endProgram == "no":

   resetVariables()

   #Loop to take in order

   while endOrder == "no":

       print("Enter 1 for Yum Yum Burge\nEnter 2 for Grease Yum Fries\nEnter 3 for Soda Yum: \n")

       option = int(input("Enter option: "))

       if option == 1:

           bugertotal = getBurger()

       elif option == 2:

           frytotal = getFry()

       elif option == 3:

           sodatotal = getSoda()

       endOrder = input("Do you want to end your order? (Enter no to add more items): ")

       mytotal = calcTotal()

       printReceipt(mytotal)

   endProgram = input("Do you want to end the program? (Enter no to process a new order): ")

Explanation:

The python source code displays the menu of a restaurant and the prices of each meal. The module takes multiple orders, calculates and displays the total bill of the order with tax included.

You might be interested in
Which ipv4 ip class provides for 126 unique networks, each having up to 16,777,214 hosts?
Sliva [168]
Class A.






----------------------------------------
3 0
3 years ago
what tool can a student use to make sure his or her work paper does not take credit for someone else's work ?
AlekseyPX

You can use a plagiarism checker.

8 0
3 years ago
Besides your computer, where else can you find and use an operating system?
Vilka [71]

Answer:

Your phone.

Explanation:

Samsung is ran off of Android.

Apple is ran off of IOS.

Both are operating systems.

3 0
3 years ago
The purpose of a business report is to _____.
mars1129 [50]
Im pretty sure the answer is 2.
4 0
3 years ago
Read 2 more answers
Rate these 3 fnaf characters from 1-3 tell me who you find the scariest as well
Brut [27]

Answer:

Golden Freddy is the scariest in my opinion

4 0
3 years ago
Read 2 more answers
Other questions:
  • A communications objective is
    15·1 answer
  • This is the most flexible way to create a query. Used to create queries that displays only the records that match criteria enter
    12·1 answer
  • The use of an information system to support the sharing of content among networks of users related by common interests is termed
    10·1 answer
  • Which of the following defines what privacy policy is?
    6·2 answers
  • The Account class contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and a
    14·1 answer
  • If a stop-and-wait protocol is used, what is the fraction of time, in seconds, that the sender is busy sending bits into the cha
    8·1 answer
  • Why is failure an important part of life and the engineering design process?
    13·2 answers
  • Can someone pls help with this (20 points)
    8·1 answer
  • Isla is writing a report on the best roller coasters in America. Which device could help her with this?
    14·1 answer
  • Does anyone know how to remove specific columns of data sets in R studio?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!