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
How does a film establish the setting?
ololo11 [35]

Answer:

Establishing Shots are critical in a film. They clue the viewer where this next scene is about to take place. Each time the location of a scene shifts, a new establishing shot does exactly; what its name implies: it establishes where the story will now continue, and fiction writers need to do the same thing.

Explanation:

8 0
2 years ago
A hard disk has four surfaces (that's top and bottom of two platters). Each track has 2,048 sectors and there are 131,072 (217)
marysya [2.9K]

Answer:

128 GB

Explanation:

Here, we are interested in calculating the total capacity of the disk.

From the question, we can identify the following;

Number of surfaces = 4

Tracks per surface = 131,072

Number of sectors = 2,048

Each Block size = 512 bytes

Mathematically;

Total data capacity of the disk = no of tracks * no of sectors * block size

= 131,072 * 2048 * 512 bytes

= 2^17 * 2^11 * 2^9 bytes = 2^37 bytes

1 GB = 2^30 bytes

So 2^37 = 2^7 * 2^30

= 128 GB

8 0
2 years ago
. The incorrect attitude towards driving is the cause of most collisions among teenage drivers.
enyata [817]
The correct answer for your question is TRUE

3 0
2 years ago
Read 2 more answers
Setting financial priorities and goals will help you save money for future needs <br> True or false?
allsm [11]
Hey there!

Here is your answer:

<u><em>The proper answer to this question is option A "true".</em></u>

Reason:

<u><em>Financial priorities, and goals would help make a person more money. Goals would include: Opening bank accounts, adding money to some sort of fund, or putting money into a bank account.</em></u>

<em>Therefore the answer is option A!</em>

If you need anymore help feel free to ask me!

Hope this helps!

~Nonportrit 
3 0
3 years ago
The power on any voltage rail of the hard drive is calculated by multiplying _____. (a). Voltage X Current (b). Voltage X Watts
Papessa [141]

Answer:

(a). Voltage X Current

Explanation:

Power -

In the concept of physics , power is denoted by P ,

Power = Voltage * Current

Power = V * I

The unit is Ampere  *  Voltage

Power is defined as the rate of work done , i.e. , work divided by time .

Power = work / time .

Power is a scalar quantity .

The standard unit of power is Watt , which is denoted by W .

6 0
3 years ago
Other questions:
  • Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeopl
    6·1 answer
  • Find the 65th percentile from the data. The data consist of class interval from 0-10, 10-20, 20-30, 30-40, 40-50, 50-60 and freq
    8·1 answer
  • Match the part of motherboard to its function
    15·1 answer
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • How many mustangs are built every day
    13·2 answers
  • Which type of password would be considered secure
    13·2 answers
  • In a PivotTable, how can a field of data be hidden from the viewer but still be active in calculations made by Excel’s formulas?
    11·1 answer
  • Using Visio, create a Local Area Network (LAN) consisting of 12 computers, a switch, and three printers. The switch should be in
    11·1 answer
  • Sue follows these steps to create a chart in her presentation.
    13·1 answer
  • And, or, not are examples of boolean logic
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!