Guest User

Untitled

a guest
Nov 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. print ("enter your name, age, and year group and password")
  2. while True:
  3. reg_name = str(input("Name:"))
  4. reg_pass = input ("Password:")
  5. reg_age = input ("age:")
  6. reg_group = input ("Year Group")
  7. print (" Is this infomation correct?")
  8. print ("Name:",reg_name)
  9. print ("password:",reg_pass)
  10. print ("Age:",reg_age)
  11. print ("Year Group:", reg_group)
  12. reg_correct = input ("[Y/N]").lower()
  13. if reg_correct == "y":
  14. reg_user = reg_name[0:3]+reg_age
  15. reg_write = open("D:\Computer science\Computing test\logindata.txt","a")
  16. reg_write.write (reg_user+","+reg_name+","+reg_pass+","+reg_age+","+reg_group+"/r/n")
  17. print ("Your username is:",reg_user)
  18. reg_write.close()
  19. break
  20. elif reg_correct == "n":
  21. print ("Please Re-enter your infomation")
  22. else:
  23. Print ("Invalid input! Please try again...!")
Add Comment
Please, Sign In to add comment