Guest User

Untitled

a guest
Oct 17th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. def SignupDetails():
  2. import csv
  3. fo= open("sign_details_record.csv","a")
  4. firstname= input("nenter your firstname: ")
  5. surname= input("enter your surname: ")
  6. age= int(input("enter your age: "))
  7. yeargroup= int(input("enter your year group: "))
  8. username= firstname[0:3]+str(age)
  9. print("username: ", username)
  10.  
  11. password= input("nplease enter a password: ")
  12. password2= input("re-enter your password to confirm: ")
  13. while password != password2:
  14. password2= input("The passwords do not match, hit enter to start again or re-enter your prevoius password to confirm: ")
  15. if password2 == "":
  16. password= input("please enter your password: ")
  17. password2= input("re-enter your password to confirm: ")
  18. else:
  19. break
  20. Signup_information_record= firstname+","+surname+","+age+","+yeargroup+","+username+","+password+"n"
  21.  
  22.  
  23. while True:
  24. 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")
  25. if createAccount == "yes":
  26. SignupDetails()
  27. fo.write(Signup_information_record)
  28.  
  29. else:
  30. fo.close()
  31. Starting_menu()
Add Comment
Please, Sign In to add comment