Simple shopping program (Continued from Page 1)

the else: 
BREAK

IF A == "snacks":
Print ( "instant noodles. 1 2 yuan.")
Print ( "crisp piece 2 4 yuan.")
Print ( "ham. 3 3 yuan.")
the while True:
A = input ( "enter the number of goods purchased, the input" B "return type select:")
IF A == ". 1":
geshu = int (input ( "enter number for later:"))
gouwuche + = "instant noodles"
gouwuche + = " * "
gouwuche = + STR (geshu)
gouwuche + =" "
SUM + = int (yinliao [" instant noodles "]) * geshu
shuliang1 = STR (geshu)
print ( "Add to Cart success")

elif A == "2":
geshu = int (the INPUT ( "Enter the purchase number:"))
gouwuche + = "piece of cake"
gouwuche + = "*"
gouwuche + = str (geshu)
gouwuche + = ""
SUM + = int (yinliao [ "piece of cake"]) * geshu
shuliang2 = str (geshu)
Print ( "Add to cart success")

elif A == "3":
geshu = int (the iNPUT ( "input later number: "))
gouwuche + =" ham "
gouwuche+="*"
gouwuche + = str (geshu)
gouwuche + = ""
SUM + = int (yinliao [ "ham"]) * geshu
Print ( "Add to Cart success")

the else:
BREAK
elif A == "BUY":
jifen = str (SUM / 2)
Print ( "you purchased commodities:")
Print (gouwuche)
Print ( "your total" + jifen + "integral")
Print (str (SUM) + "yuan")
IF float (jifen)> = 0.0 and float (jifen) <= 50.0:
vip = "ordinary members"
if float(jifen)>50.0 and float(jifen)<=150.0:
vip = "Master"
elif a float (jifen)> 150.0 and a float (jifen) <= 200.0:
vip = "Silver Gold Member"
elif a float (jifen)> 200.0:
vip = "Diamond member"
AA = INPUT ( "input "2" to view your personal information: ")
IF AA ==" 2 ":
Print (" personal information: ")
Print (vip)
Print (" name: "+ nameku)
Print (" sex: "+ sexku)
the else:
Print ( "input error")
the else:
Print ( "enter account number or password is incorrect, please re-enter")

Guess you like

Origin www.cnblogs.com/hzze/p/10942707.html