Shopping Register Log (Continued from Page 1)

 

SUM = 0
gouwuche = ""
Shuliang = 0
Shouji = { "Apple 7": 3666, "Apple 8": 5666, "Apple X": 8999}
yinliao = { "wanglaoji": 5 "JDB": 4.5 , "and its being": 4}

userku = ""
psdku = ""
nameku = {}
sexku = {}
jifen = "0"
vip = ""

a = input ( "Please enter" 1 "Create an account:")
IF A == "1":
nameku the INPUT = ( "Please enter your name:")
sexku the INPUT = ( "Please enter the sex:")
userku the INPUT = ( " Please enter the account number: ")
psdku = the iNPUT (" Please enter your password: ")
Print (" registered, please login account ")
the while True:
the User = the iNPUT (" Please enter account: ")
PSD = the iNPUT (" Please enter your password : ")
IF the User and PSD == == userku psdku:
Print (" Welcome Dear "+ nameku +" into the store ")
Print (" personal information: ")
Print (" Member ")
Print (" name: " nameku +)
Print ( "sex:" + sexku)
the while True:
A = the iNPUT ( "enter a product type:" mobile phone "or" drink ", enter" BUY "settlement:")
IF A == "mobile phone":
Print ( "1. Apple 73,666 dollars")
Print ( "2 Apple membered 85,666.")
Print ( "apple. 3 x 8999 membered.")
The while True:
A = INPUT ( "Enter the number of goods purchased, the input" B "Return Type Select:")
A == IF ". 1":
geshu = int (INPUT ( "Enter number for later:"))
gouwuche + = "apple. 7"
gouwuche + = "*"
gouwuche = + STR (geshu)
gouwuche + = ""
SUM + = int (shouji [ "apple 7"]) * geshu
shuliang1 = str (geshu)
Print ( "Add to cart success")

A == elif "2":
geshu = int (INPUT ( "Enter number for later:"))
gouwuche + = "apple. 8"
gouwuche + = "*"
gouwuche = + STR (geshu)
gouwuche + = ""
SUM + = int (shouji [ "apple 8"]) * geshu
shuliang2 = str (geshu)
Print ( "Add to cart success")

A == elif ". 3":
geshu = int (INPUT ( "Enter number for later:"))
gouwuche + = "Apple X"
gouwuche + = "*"
gouwuche = + STR (geshu)
gouwuche + = ""
SUM + = int (shouji [ "apple the X-"]) * geshu
Print ( "Add to cart success")

else:
break

if a == "Beverage":
Print (. ". 1 wanglaoji 5 yuan")
Print ( "2 JDB 4.5 yuan.")
Print ( "n. 3 and its four 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 + =" wanglaoji "
gouwuche + =" * "
str + = gouwuche (geshu)
gouwuche + = ""
SUM + = int (yinliao [ "Wong Lo Kat"]) * geshu
shuliang1 = str (geshu)
Print ( "Add to cart success")

A == elif "2":
geshu = int (INPUT ( "Enter number for later:"))
gouwuche + = "JDB"
gouwuche + = "*"
gouwuche = + STR (geshu)
gouwuche + = ""
SUM + = int (yinliao [ "JDB"]) * geshu
shuliang2 = str (geshu)
Print ( "Add to cart success")

A == elif ". 3":
geshu = int (INPUT ( "Enter number for later:"))
gouwuche = + "and its being"
gouwuche + = "*"
gouwuche = + STR (geshu)
gouwuche + = ""
SUM + = int (yinliao [ "and its being"]) * 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 a float (jifen)> = 0.0 and a float (jifen) <= 50.0:
VIP = "Member"
IF a float (jifen)> 50.0 and a float (jifen) <= 150.0:
VIP = " senior Member "
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" View profile: ")
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/you9988/p/10942499.html