Untitled

mail@pastecode.io avatar
unknown
python
2 months ago
1.4 kB
0
Indexable
Never
# -------------------------------------------------------------------
# Global variables
# -------------------------------------------------------------------
userTable = [["LArmstrong3", "RedChair"],
             ["SBarrett7", "PurpleDesk"],
             ["EChisholm4", "YellowStool"],
             ["VDunn1", "OrangeFuton"],
             ["DElms5", "GreenCouch"],
             ["EFirsova13", "PinkMattress"],
             ["JGolland6", "GreenTable"],
             ["FHartley13", "BrownMirror"],
             ["DJohnstone12", "GoldBed"],
             ["GKirkhope8", "WhiteNights"],
             ["LLemon8", "BeigeDresser"],
             ["HMacCunn6", "GreyOttoman"],
             ["PNewland10", "BlackWardrobe"],
             ["AOldham5", "OrangeFuton"],
             ["JPook8", "YellowStool"]]

# =====> Write your code here
username = input("Please enter Username:    ")
password = input("Please enter password:    ")
# -------------------------------------------------------------------
# Main program
# -------------------------------------------------------------------
x = 0

# =====> Write your code here
for i in range (0,15):
    if userTable[i][0] == username:
        print("Welcome Mr", username)
    elif userTable[i][1] == password:
        print("correct password")
    else:
        print("wrong usernme or password")
Leave a Comment