Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

def main():

Need help debugging this python code. Are there any programming experts that can help.

def main():

  endProgram,endOrder,endtotalBurger,endtotalFry,endtotalSoda,endTotal,endTax,

  endSubtotal,endOption,endburgerCount,endfryCount,endsodaCount =declareVariables

  while endProgram == 'no':

    totalBurger, totalSoda, totalFry, total, tax, subtotal = resetVariables()

    while endOrder == 'no':

     option = input('1 for burger, 2 for fry, 3 for soda')

     if option == 1:

        #call getBurger

        totalBurger = getBurger(totalBurger, burgerCount)

     elif option == 2:

        #call getFry

        totalFries = getFry(totalfry, fryCount)

     elif option == 3:

        #call getSoda

        totalSoda = getSoda(totalSoda, sodaCount)

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

     total = calcTotal(totalBurger, totalFry, totalSoda, total, subtotal, tax)

     printReceipt(total)

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

def declareVariables():

  endProgram = 'no'

  endOrder = 'no'

  totalBurger = 0

  totalFry = 0

  totalSoda = 0

  total = 0

  tax = 0

  subtotal = 0

  option = 0

  burgerCount = 0

  fryCount = 0

  sodaCount = 0

  return endProgram, endOrder, endtotalBurger, endtotalFry, endtotalSoda, endtotal,

  endtax, endsubtotal, endoption, endburgerCount, endfryCount,

  endsodaCount

def resetVariables():

  totalBurger = 0

  totalSoda = 0

  totalFry = 0

  total = 0

  tax = 0

  subtotal = 0

  return totalBurger, totalSoda, totalFry, total, tax, subtotal

def getBurger(totalBurger, burgerCount):

  burgerCount = input('enter the number of burgers you want')

  totalBurger = totalBurger + burgerCount * .99

  return totalBurger

def getFry(totalFry, fryCount):

  fryCount = input('enter the number of fries you want')

  totalFry = totalFry + fryCount * .79

def getSoda(totalsoda, sodaCount):

  sodaCount = input('enter the number of sodas you want')

  totalSoda = totalSoda + sodaCount * 1.09

main()

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question