Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numberoftries = 3
- print("Hello Mr Lee!")
- while numberoftries > 0:
- print("You have", (numberoftries), "tries remaining")
- username =(input("Enter the username"))
- password = (input("Enter the password"))
- if (password) == "password" and (username) == "MrLee123":
- import time
- time.sleep(1)
- print("Username and password accepted")
- print("Choose a student")
- print("1.) Hanif Adolecense")
- print("2.) Kerlo Sumpage")
- print("3.) Kearien Honter")
- print("4.) Mex Whitermen")
- print("5.) Tolu Ohyeahbola")
- print("6.) Konstipated De Bruen")
- print("7,) Alegandro Azzzznaar")
- print("8.) Ben Inmen")
- print("9,) Tomas Woodhouse")
- print("10.) Ruth Macewan")
- print("11.) Matrew Hogwarts")
- print("12.) Dilan Vaughan")
- print("13.) Nafanial Ballaaaad")
- print("14.) Laluwa Niyi Afuya")
- print("15.) Scooter Burrow")
- print("16.) Elred Marten Lawsun")
- print("17.) Jaime Beltranee")
- print("18.) Looke Oakly")
- print("Press enter to quit")
- answer = input("Select an option r = read, w = write eg w1 ")
- numberoftries = 0
- if answer == "w1":
- student1 = []
- student1.append(input("Enter his given name"))
- student1.append(input("Enter his surname"))
- student1.append(input("Enter his ID Number"))
- student1.append(input("Enter his Date of birth"))
- student1.append(input("Enter his gender"))
- student1.append(input("Enter his tutor group"))
- student1.append(input("Enter his place of birth"))
- student1.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Hanif.txt", "w")
- for item in student1:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r1":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Hanif.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w2":
- student2 = []
- student2.append(input("Enter his given name"))
- student2.append(input("Enter his surname"))
- student2.append(input("Enter his ID Number"))
- student2.append(input("Enter his Date of birth"))
- student2.append(input("Enter his gender"))
- student2.append(input("Enter his tutor group"))
- student2.append(input("Enter his place of birth"))
- student2.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Kerlo.txt", "w")
- for item in student2:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r2":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Kerlo.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w3":
- student3 = []
- student3.append(input("Enter his given name"))
- student3.append(input("Enter his surname"))
- student3.append(input("Enter his ID Number"))
- student3.append(input("Enter his Date of birth"))
- student3.append(input("Enter his gender"))
- student3.append(input("Enter his tutor group"))
- student3.append(input("Enter his place of birth"))
- student3.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Kearian.txt", "w")
- for item in student3:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r3":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Kearian.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w4":
- student4 = []
- student4.append(input("Enter his given name"))
- student4.append(input("Enter his surname"))
- student4.append(input("Enter his ID Number"))
- student4.append(input("Enter his Date of birth"))
- student4.append(input("Enter his gender"))
- student4.append(input("Enter his tutor group"))
- student4.append(input("Enter his place of birth"))
- student4.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Mex.txt", "w")
- for item in student4:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r4":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Mex.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w5":
- student5 = []
- student5.append(input("Enter his given name"))
- student5.append(input("Enter his surname"))
- student5.append(input("Enter his ID Number"))
- student5.append(input("Enter his Date of birth"))
- student5.append(input("Enter his gender"))
- student5.append(input("Enter his tutor group"))
- student5.append(input("Enter his place of birth"))
- student5.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Tolu.txt", "w")
- for item in student5:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r5":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Tolu.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w6":
- student6 = []
- student6.append(input("Enter his given name"))
- student6.append(input("Enter his surname"))
- student6.append(input("Enter his ID Number"))
- student6.append(input("Enter his Date of birth"))
- student6.append(input("Enter his gender"))
- student6.append(input("Enter his tutor group"))
- student6.append(input("Enter his place of birth"))
- student6.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Konstipated.txt", "w")
- for item in student6:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r6":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Konstipated.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w7":
- student7 = []
- student7.append(input("Enter his given name"))
- student7.append(input("Enter his surname"))
- student7.append(input("Enter his ID Number"))
- student7.append(input("Enter his Date of birth"))
- student7.append(input("Enter his gender"))
- student7.append(input("Enter his tutor group"))
- student7.append(input("Enter his place of birth"))
- student7.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Alegandro.txt", "w")
- for item in student7:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r7":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Alegandro.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w8":
- student8 = []
- student8.append(input("Enter his given name"))
- student8.append(input("Enter his surname"))
- student8.append(input("Enter his ID Number"))
- student8.append(input("Enter his Date of birth"))
- student8.append(input("Enter his gender"))
- student8.append(input("Enter his tutor group"))
- student8.append(input("Enter his place of birth"))
- student8.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Ben.txt", "w")
- for item in student8:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r8":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Ben.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w9":
- student9 = []
- student9.append(input("Enter his given name"))
- student9.append(input("Enter his surname"))
- student9.append(input("Enter his ID Number"))
- student9.append(input("Enter his Date of birth"))
- student9.append(input("Enter his gender"))
- student9.append(input("Enter his tutor group"))
- student9.append(input("Enter his place of birth"))
- student9.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Tomas.txt", "w")
- for item in student6:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r9":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Tomas.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w10":
- student10 = []
- student10.append(input("Enter his given name"))
- student10.append(input("Enter his surname"))
- student10.append(input("Enter his ID Number"))
- student10.append(input("Enter his Date of birth"))
- student10.append(input("Enter his gender"))
- student10.append(input("Enter his tutor group"))
- student10.append(input("Enter his place of birth"))
- student10.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Ruth.txt", "w")
- for item in student10:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r10":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Ruth.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w11":
- student11 = []
- student11.append(input("Enter his given name"))
- student11.append(input("Enter his surname"))
- student11.append(input("Enter his ID Number"))
- student11.append(input("Enter his Date of birth"))
- student11.append(input("Enter his gender"))
- student11.append(input("Enter his tutor group"))
- student11.append(input("Enter his place of birth"))
- student11.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Matrew.txt", "w")
- for item in student11:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r11":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Matrew.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w12":
- student12 = []
- student12.append(input("Enter his given name"))
- student12.append(input("Enter his surname"))
- student12.append(input("Enter his ID Number"))
- student12.append(input("Enter his Date of birth"))
- student12.append(input("Enter his gender"))
- student12.append(input("Enter his tutor group"))
- student12.append(input("Enter his place of birth"))
- student12.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Dilan.txt", "w")
- for item in student12:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r12":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Dilan.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w13":
- student13 = []
- student13.append(input("Enter his given name"))
- student13.append(input("Enter his surname"))
- student13.append(input("Enter his ID Number"))
- student13.append(input("Enter his Date of birth"))
- student13.append(input("Enter his gender"))
- student13.append(input("Enter his tutor group"))
- student13.append(input("Enter his place of birth"))
- student13.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Nafanial.txt", "w")
- for item in student13:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r13":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Nafanial.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w14":
- student14 = []
- student14.append(input("Enter his given name"))
- student14.append(input("Enter his surname"))
- student14.append(input("Enter his ID Number"))
- student14.append(input("Enter his Date of birth"))
- student14.append(input("Enter his gender"))
- student14.append(input("Enter his tutor group"))
- student14.append(input("Enter his place of birth"))
- student14.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Laluwa.txt", "w")
- for item in student14:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r14":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Laluwa.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w15":
- student15 = []
- student15.append(input("Enter his given name"))
- student15.append(input("Enter his surname"))
- student15.append(input("Enter his ID Number"))
- student15.append(input("Enter his Date of birth"))
- student15.append(input("Enter his gender"))
- student15.append(input("Enter his tutor group"))
- student15.append(input("Enter his place of birth"))
- student15.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Scooter.txt", "w")
- for item in student15:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r15":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Scooter.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w16":
- student16 = []
- student16.append(input("Enter his given name"))
- student16.append(input("Enter his surname"))
- student16.append(input("Enter his ID Number"))
- student16.append(input("Enter his Date of birth"))
- student16.append(input("Enter his gender"))
- student16.append(input("Enter his tutor group"))
- student16.append(input("Enter his place of birth"))
- student16.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Elred.txt", "w")
- for item in student16:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r16":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Elred.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w17":
- student17 = []
- student17.append(input("Enter his given name"))
- student17.append(input("Enter his surname"))
- student17.append(input("Enter his ID Number"))
- student17.append(input("Enter his Date of birth"))
- student17.append(input("Enter his gender"))
- student17.append(input("Enter his tutor group"))
- student17.append(input("Enter his place of birth"))
- student17.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Jaime.txt", "w")
- for item in student17:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r17":
- f = open("H:\\Computing\\Unit 3\\MrLee\\jaime.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- if answer == "w18":
- student18 = []
- student18.append(input("Enter his given name"))
- student18.append(input("Enter his surname"))
- student18.append(input("Enter his ID Number"))
- student18.append(input("Enter his Date of birth"))
- student18.append(input("Enter his gender"))
- student18.append(input("Enter his tutor group"))
- student18.append(input("Enter his place of birth"))
- student18.append(input("Enter his school email"))
- f = open("H:\\Computing\\Unit 3\\MrLee\\Looke.txt", "w")
- for item in student18:
- f.write(str(item) + "\n")
- print("Written")
- f.close()
- elif(answer) == "r18":
- f = open("H:\\Computing\\Unit 3\\MrLee\\Looke.txt", "r")
- for item in range(0, 9):
- content = f.readline()
- print(content)
- else:
- print("try again")
- numberoftries -= 1
- if numberoftries == 0:
- print("Too many attempts")
- input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement