Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- firstname = input("First name: ")
- surname = input("Surname: ")
- age = int(input("Age: "))
- password = input("Password: ")
- username = firstname[:3] + str(age)
- with open("account.txt","a",newline="") as myfile:
- writer = csv.writer(myfile)
- writer.writerow([username,password,firstname,surname,age])
- myfile.close()
- menu()
- user0 = input("Username: ")
- pass0 = input("Password: ")
- file = open("account.txt","r")
- for line in file:
- details = line.split(",")
- if user0 == details[0] and pass0 == details[1]:
- print("Correct!")
- else:
- print("Fail")
- menu()
- selection = int(input("1 or 2: "))
- if selection == 1:
- register()
- else:
- login()
Add Comment
Please, Sign In to add comment