def main():
endProgram = "No"
while endProgram == "No":
endOrder = "No"
amountBurger = 0
amountFry = 0
amountSoda = 0
tax = 0
total = 0
while endOrder == "No":
totalBurger = getBurger()
totalFry = getFry()
totalSoda = getSoda()
endOrder = raw_input("End the order? (Yes or No) ")
priceTotal = calcTotal(totalBurger, totalFry, totalSoda)
printTotal(priceTotal)
endProgram = raw_input("Closing time? (End the program? Yes or No)")
def getBurger():
amountBurger = input("How many burgers? (0 if none) ")
priceBurger = amountBurger * .99
taxBurger = priceBurger * .06
totalBurger = priceBurger + taxBurger
return getBurger
def getFry():
amountFry = input("How many fries? (0 if none) ")
priceFry = amountFry * .79
taxFry = priceFry * .06
totalFry = priceFry + taxFry
return totalFry
def getSoda():
amountSoda = input("How many Sodas? (0 if none) ")
priceSoda = amountSoda * 1.09
taxSoda = priceSoda * .06
totalSoda = priceSoda + taxSoda
return totalSoda
def calcTotal(totalBurger, totalFry, totalSoda):
priceTotal = totalBurger + totalFry + totalSoda
return priceTotal
def printTotal(priceTotal):
print "Total: $",priceTotal
return printTotal
main()