in case anyone was interested in what was written, this is how i did it... i figured 300fg just to make this little program was good lol its like 1page of code... i didnt even ask for it to be commented lol
Code
toppingselection = "" #declaration as a string
pizzatype = "" #declaration as a string
pizzasize = "" #declaration as a string
sizetypecost = 0.0 #declaration as a float
tax = 0.0 #declaration as a float
toppings = 0.0 #declaration as a float
subtotal = 0.0 #declaration as a float
totalprice = 0.0 #declaration as a float
print ("Welcome to the Mackey's Pizza app, this app will calculate the price of your pizza based on what you order") #Welcome message
pizzatype = str(input("Please Enter Pizza Type\n\tR for round\n\tS for square ")) #Input for pizzatype variable
pizzasize = str(input("Please Enter the size of your pizza:\n\tSmall - S\n\tMedium - M\n\tLarge - L\n\tExtra Large - XL: "))#input for pizzasize variable
if pizzatype == "R" and pizzasize == "S":#if statement that decides how much the sizetypecost will be
sizetypecost = 5.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "M":#elif statement that decides how much the sizetypecost will be
sizetypecost = 7.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "L":#elif statement that decides how much the sizetypecost will be
sizetypecost = 9.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "XL":#elif statement that decides how much the sizetypecost will be
sizetypecost = 11.95 #set sizetypecost
elif pizzatype =="S" and pizzasize == "S":#elif statement that decides how much the sizetypecost will be
sizetypecost = 6.95 #set sizetypecost
elif pizzatype =="S" and pizzasize == "M":#elif statement that decides how much the sizetypecost will be
sizetypecost = 8.95 #set sizetypecost
elif pizzatype == "S" and pizzasize == "L":#elif statement that decides how much the sizetypecost will be
sizetypecost = 10.95 #set sizetypecost
elif pizzatype == "S" and pizzasize == "XL":#elif statement that decides how much the sizetypecost will be
sizetypecost = 12.95 #set sizetypecost
while toppingselection != "E":#toppingselection loop, will end if E is entered
toppingselection = str(input("Please enter what type of toppings you would like\n\tM for meats such as peperoni, sausage, etc...\n\tV for veggies\n\tC for extra cheese\n\tE if you are done selecting toppings."))#input for toppingselection
if toppingselection == "M":#if statement for toppingselection = M
toppings = toppings+1.50 #topping adds 1.50 to total of toppings if selection is M
elif toppingselection == "V":#elif statement for toppingselection = V
toppings = toppings+1.00#topping adds 1.00 to total of toppings if selection is V
elif toppingselection == "C":#elif statement for toppingselection = C
toppings = toppings+1.25#topping adds 1.25 to total of toppings if selection is C
subtotal = toppings+sizetypecost#subtotal formula
tax = (toppings+sizetypecost)*.06#tax formula
totalprice = toppings+sizetypecost+tax#totalprice formula
print ("---------------------------------------------------")#print statement to make this look nice
print ("\tThe pizza you selected costs: \t$",format(sizetypecost, '.2f'))#formatted print statement for sizetypecost
print ("\tThe toppings you ordered cost: \t$",format(toppings, '.2f'))#formatted print statement for topping cost
print ("\tYour subtotal is: \t\t$",format(subtotal, '.2f'))#formatted print statement for subtotal
print ("\tYour tax is: \t\t\t$",format(tax, '.2f'))#formatted print statement for tax
print ("---------------------------------------------------")#print statement to make this look nice
print ("\tThe total for your order is: \t$",format(totalprice, '.2f'))#formatted print statement for totalprice
This post was edited by Drakwen on Jun 20 2015 07:49pm