Shopping Register Login

SUM = 0 
gouwuche = "" 
Shuliang = 0 
gaodian = { "red bean cake": 5 "mung bean cake": 7, "plum cakes": 10} 
yinliao = { "coconut milk": 4 "pearl milk tea": 4 , "red tea":. 3} 

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

A = iNPUT ( "enter" 1 "Create account:") 
IF A == "1": 
    nameku the iNPUT = ( "Please enter your name:") 
    sexku the iNPUT = ( "Please enter the sex:") 
    userku the iNPUT = ( "Please enter account:") 
    psdku the iNPUT = ( "enter 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:" pastry "or" tea ", enter" BUY "settlement:") 
                IF A == "cake": 
                    Print (. ". 1 red bean cake 5 yuan") 
                    Print ( "2 mung bean cake 7 yuan.") 
                    Print ( ". 3 plum cake 10 yuan.") 
                    the while True: 
                        A = iNPUT ( "enter number to purchase goods, input "B" return type select: ") 
                        IF A ==". 1 ": 
                            geshu = int (iNPUT (" enter number for later: ")) 
                            gouwuche + =" red bean cake " 
                            gouwuche + =" * "
                            gouwuche + = str (geshu)
                            gouwuche + = ""
                            geshu = int (input ( "Enter number for later:"))
                            sum + = int (gaodian [ "red bean cake"]) * geshu
                            shuliang1 = str (geshu) 
                            Print ( "Add to Cart success") 
                                
                        elif A == "2": 
                            geshu = int (the INPUT ( "Enter the purchase number:")) 
                            gouwuche + = "bean cake" 
                            gouwuche + = "*" 
                            gouwuche + = str (geshu) 
                            gouwuche + = "" 
                            SUM + = int (gaodian [ "bean cake"]) * geshu 
                            shuliang2 = str (geshu) 
                            Print ( "Add to cart success") 
                            
                        elif A == "3": 
                            gouwuche + = "plum pudding"
                            gouwuche+="*"
                            gouwuche + = str (geshu) 
                            gouwuche + = "" 
                            SUM + = int (gaodian [ "plum pudding"]) * geshu 
                            Print ( "Add to Cart success") 
                            
                        the else: 
                            BREAK 
                    
                IF A == "tea": 
                    . Print ( "1 coconut fruit tea four yuan ") 
                    Print (" 2 pearl milk tea four yuan "). 
                    Print (". 3 bean milk 3 yuan "). 
                    the while True: 
                        A = iNPUT (" enter number to purchase goods, an input "B" return type select: " ) 
                        IF A == ". 1":
                            gouwuche+="*"
                            geshu = int (input ( "Enter number for later:"))
                            gouwuche + = "coconut milk" 
                            gouwuche + = str (geshu) 
                            gouwuche + = "" 
                            SUM + = int (yinliao [ "coconut milk"]) * geshu 
                            shuliang1 = str (geshu) 
                            Print ( "Add to Cart success") 
                            
                        elif A = = "2": 
                            geshu = int (iNPUT ( "input later number:")) 
                            gouwuche + = "pearl milk tea" 
                            gouwuche + = "*" 
                            gouwuche + = STR (geshu) 
                            gouwuche + = "" 
                            SUM + = int (yinliao [ "pearl milk tea "]) * geshu 
                            shuliang2 = STR (geshu) 
                            Print ( "Add to Cart success ") 
                            
                        elif A ==" 3 ": 
                            geshu = int (the INPUT ( "Enter the purchase number:")) 
                            gouwuche + = "red bean milk tea" 
                            gouwuche + = "*" 
                            gouwuche + = str (geshu) 
                            gouwuche + = "" 
                            SUM + = int (yinliao [ "red tea"]) * geshu 
                            Print ( "Add to cart success") 
                            
                        the else: 
                            BREAK 
                elif a == "BUY": 
                    jifen = str (SUM / 2) 
                    Print ( "your purchase are:") 
                    Print (gouwuche) 
                    Print ( "Your total" + jifen + "integral")
                    print (str (sum) + "Yuan")+sexku)
                    else:)
                    if float(jifen)>=0.0 and float(jifen)<=50.0:
                        vip = "Member" 
                    IF a float (jifen)> 50.0 and a float (jifen) <= 150.0: 
                        vip = "Master" 
                    elif a float (jifen)> 150.0 and a float (jifen) <= 200.0: 
                        vip = "Silver Gold Member " 
                    elif float (jifen)> 200.0: 
                        vip =" Diamond Member " 
                    AA = the iNPUT (" input "2" to view your personal information: ") 
                    IF AA ==" 2 ": 
                        Print (" personal information: ") 
                        Print (vip ) 
                        Print ( "name:" + nameku) 
                        Print ( "sex:" + sexku) 
                        Print ( "Input error ") 
        the else: 
            Print (" Enter account number or password is incorrect, please re-enter ")









  

Guess you like

Origin www.cnblogs.com/zhuiguangzhe/p/10935303.html