Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def SignupDetails():
- import csv
- fo= open("sign_details_record.csv","a")
- firstname= input("nenter your firstname: ")
- surname= input("enter your surname: ")
- age= int(input("enter your age: "))
- yeargroup= int(input("enter your year group: "))
- username= firstname[0:3]+str(age)
- print("username: ", username)
- password= input("nplease enter a password: ")
- password2= input("re-enter your password to confirm: ")
- while password != password2:
- password2= input("The passwords do not match, hit enter to start again or re-enter your prevoius password to confirm: ")
- if password2 == "":
- password= input("please enter your password: ")
- password2= input("re-enter your password to confirm: ")
- else:
- break
- Signup_information_record= firstname+","+surname+","+age+","+yeargroup+","+username+","+password+"n"
- while True:
- createAccount= input("nDo you want to create a new account?nyou will be redirected to main menu if you enter no (yes or no)n")
- if createAccount == "yes":
- SignupDetails()
- fo.write(Signup_information_record)
- else:
- fo.close()
- Starting_menu()
Add Comment
Please, Sign In to add comment