Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import random
- import os
- from pc_data import *
- newacc = input("Do you need a new account? (Y/N)")
- if newacc in ("Y","y"):
- acctype = input("""What account type do you want?
- 1 - Student
- 2 - Teacher
- 3 - Admin""")
- if acctype == "1":
- sfn = input("Please enter your first name: ")
- ssn = input("Please enter your second name: ")
- syr = input("Pleae enter what year you are in: ")
- #syr = int()
- new_username = [sfn[0]+ssn+syr]
- new_student_acc = [sfn, ssn, new_username]
- pc_student.append(new_student_acc)
- print("Ok, your account user name is:", new_username,"now lets get you a password")
- print("")
- u_password = input("Please enter a password: ")
- u_password_confirm = input("Please re enter your password: ")
- if u_password == u_password_confirm:
- pass
- else:
- print("Passwords do not match! Please try again.")
- sys.exit() #this is so the program does not run on
- print("")
- print("Success! You have now got a basic 'Student' PC account!")
- print("")
- elif acctype == "2":
- tfn = input("Please enter your first name: ")
- tsn = input("Please enter your first name: ")
- Numbers = range(1, 999)
- RandomNumber = random.choice(Numbers)
- print("")
- print ("Your account username is: ", tfn[0] + tsn + str(RandomNumber),"Now lets get you a password.")
- print("")
- t_password = input("Please enter a password: ")
- t_password_confirm = input("Please confirm your password: ")
- if t_password == t_password_confirm:
- pass
- else:
- print("Passwords do not match! Please restart the program!")
- sys.exit()
- elif newacc == "N":
- pass
- else:
- print("Invalid input!")
- startup = int(input("""Welcome User! What would you like to login as?
- 1 - Student
- 2 - Teacher
- 3 - Admin)"""))
- if startup == 1:
- print("Startup 1")
- elif startup == 2:
- print("Startup 2")
- elif startup == 3:
- print("Startup 3")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement