Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print ("enter your name, age, and year group and password")
- while True:
- reg_name = str(input("Name:"))
- reg_pass = input ("Password:")
- reg_age = input ("age:")
- reg_group = input ("Year Group")
- print (" Is this infomation correct?")
- print ("Name:",reg_name)
- print ("password:",reg_pass)
- print ("Age:",reg_age)
- print ("Year Group:", reg_group)
- reg_correct = input ("[Y/N]").lower()
- if reg_correct == "y":
- reg_user = reg_name[0:3]+reg_age
- reg_write = open("D:\Computer science\Computing test\logindata.txt","a")
- reg_write.write (reg_user+","+reg_name+","+reg_pass+","+reg_age+","+reg_group+"/r/n")
- print ("Your username is:",reg_user)
- reg_write.close()
- break
- elif reg_correct == "n":
- print ("Please Re-enter your infomation")
- else:
- Print ("Invalid input! Please try again...!")
Add Comment
Please, Sign In to add comment