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]
2 years ago
5

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

Computers and Technology
1 answer:
lora16 [44]2 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
What are screenshots helpful for ?
alex41 [277]

A

Creating.

Explanation:

What else would they be used for

4 0
3 years ago
Read 2 more answers
Consider the following program:
Nostrana [21]

Answer:

this would be answer D

Explanation:

7 0
3 years ago
IblMessage.txt=welcome to fiji.what is the error in the coding and what type of error is it?(explain)​
spin [16.1K]

Answer:

The correct syntax (assuming WinForms) is

lblMessage.Text = "Welcome to fiji";

The given statement fails to follow the syntax of literal strings, which should be in quotation marks. (depending on the framework and programming language, the txt property may also be incorrect, as well as the missing semi-colon).

8 0
3 years ago
How would you maximize the use of outsourced programmers?
Lerok [7]

Answer:

the answer is: release them when the project is complete

Explanation:

8 0
3 years ago
A simple system is to be designed to allow for the selling of old books. There are two different types of users: buyers and sell
VMariaS [17]
Yes yes yes yes yeah yes
7 0
3 years ago
Other questions:
  • Rachel uses a word processor to write short stories. However, most of her time is spent toying with the keys, rather than in wri
    13·2 answers
  • Explain how to identify a starting position on a line.
    15·2 answers
  • c++ You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive
    5·1 answer
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the d
    12·1 answer
  • Write python code that does the following: Ask the user to enter as many as number they want; Then find the sum and the average
    10·1 answer
  • Write a function called changeCharacter that takes three parameters – a character array, its size, and the replacement character
    15·1 answer
  • How are 1gls different from 2gls​
    10·1 answer
  • Which of the following makes Super Mario Run unique?
    6·1 answer
  • How is video compression accomplished?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!