Im haveing a problem with a syntax error, it registers a portion and then tells me syntax error then highlights in red part of the else if statement. i have retyped that section and if keeps telling me error. so if you one would help i would greatly appreciate it. this is the first computer language im learning.
its the first elif that is what is registering the error.
def main(): endProgram = ("no") print while endProgram == ("no"): totalBurger = 0 totalFry = 0 totalSoda = 0 endOrder = ("no") while endOrder == ("no"): print print ("Enter 1 for Yum Yum Burger") print ("Enter 2 for Grease Yum Fries") print ("Enter 3 for Soda Yum") option = input('Enter now ->') if option == 1: totalBurger = getBurger(totalBurger) elif option == 2: totalFry = getFry(totalFry) elif option == 3: totalSoda = getSoda(totalSoda) else: print ("You have entered an invalid option!!!") endOrder = raw_input("Do you want to end your order? (Enter yes or no): ") print total = calcTotal(totalBurger, totalFry, totalSoda) printReceipt(total) endProgram = raw_input("Do you want to end program? (Enter no to process a new order): ") def getBurger(totalBurger): burgerCount = input("Enter the number of burgers you want ") totalBurger = totalBurger + burgerCount * .99 return totalBurger def getFry(totalFry): fryCount = input('Enter the number of fries you want ') totalFry = totalFry + fryCount * .79 return totalFry def getSoda(totalSoda): sodaCount = input('Enter the number of sodas you want ') totalSoda = totalSoda + sodaCount * 1.09 return totalSoda def calcTotal(totalBurger, totalFry, totalSoda): subtotal = totalBurger + totalFry + totalSoda tax = subtotal * .06 total = subtotal + tax return total def printReceipt(total): print ("The total price is $", total) main() >
Edited by MelanieMariaBlume, 14 March 2016 - 07:30 PM.