Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getData (filename):
- textfile = open ("facepalm", "r")
- user1 = ["sj", "101", "fullname1", "age1", "address1"]
- user2 = ["lady", "byron", "fullname2", "age2", "address2"]
- masterlist = [[user1],[user2]]
- return masterlist
- textfile.close()
- def usernameAndPasswordInput ():
- username = input ("Enter your username: ")
- password = input ("Enter your password: ")
- print ()
- for elmt in masterlist:
- if elmt [0]==username:
- if elmt [1]==password:
- return masterlist
- else:
- print ("Your username or password is incorrect.")
- print ()
- return False
- def main() :
- startMessage ()
- getData ("facepalm")
- LoginResponse = False
- while LoginResponse == False:
- Startresponse = startOptions ()
- if Startresponse == "1":
- LoginResponse = usernameAndPasswordInput ()
- elif Startresponse == "2" :
- quitMessage ()
- return
- #LoginResponse
- if LoginResponse == True:
- HomePageResponse = homePageOptions ()
- #HomePageResponse
- if HomePageResponse == "1":
- viewProfile ()
- elif HomePageResponse == "2":
- viewMessages ()
- elif HomePageResponse == "3":
- Message = leaveMessage ()
- elif HomePageResponse == "4":
- Startresponse = startOptions ()
- main ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement