
-----------------------------------
Pythonsoccer
Tue Mar 22, 2011 8:27 am

Python unable to add to the code
-----------------------------------
whenever i go to add to the code to finish it
it errors out and doesnt ask the question right to get the answer
print    "-  Nikolai Vladamier's BURGER Depot  -"
print	 "1.	The Russian Burgette  . . . 5.99"
print	 "2.	Big Nikssss . . . . . . . . 3.99"
print	 "3.	VLADS Secret Surprise . . . 1.99"
print	 "4.	Fries . . . . . . . . . . . 1.29"
print	 "5.	Soda Pop . . .. . . . . . . 1.19"
print	 "6.	Exit  "
print	 "--------------------------------------"	
russianburgette = "1"
bignikssss = "2"
vladssecret = "3"
Fries = "4"
Soda = "5"
Exit = "6"
yes = "yes"
no = "no"
total = 0

while True:
	order = raw_input("What Would you like to order? ")
	if order == "6":
		break
	elif "1" in order:
		total+=5.99
	elif "2" in order:
		total += 3.99
	elif "3" in order:
		total += 1.99
	elif "4" in order:
		total += 1.29
	elif "5" in order:
		total += 1.19
                  if "4" not in order:
		print "would you like fries with that? "
	if yes:
		total += 1.29
	elif no:
		print total
	
print total

the point of the code is to ask the user what they would like to order and if fries arent in the order the user will be asked if they would like some but i cant get the fries part to work what so ever

-----------------------------------
apython1992
Tue Mar 22, 2011 8:32 am

RE:Python unable to add to the code
-----------------------------------
Welcome! When you are asking the user if he/she would like to order fries, are you currently doing anything to get user input?

-----------------------------------
Pythonsoccer
Tue Mar 22, 2011 8:37 am

RE:Python unable to add to the code
-----------------------------------
ya its part of the order process but when i answer it doesnt seem to add to the total nor end the loop when told no

-----------------------------------
apython1992
Tue Mar 22, 2011 8:42 am

RE:Python unable to add to the code
-----------------------------------
But I'm talking about when you ask about getting fries.  Currently, you are printing the question, but there is nothing there for the user to actually input "yes" or "no".

-----------------------------------
Pythonsoccer
Wed Mar 23, 2011 7:45 am

RE:Python unable to add to the code
-----------------------------------
nvm i got it
i entered another input and if statement moved to get it to work

-----------------------------------
apython1992
Wed Mar 23, 2011 8:50 am

RE:Python unable to add to the code
-----------------------------------
Glad to hear.
