Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login():
- username = input("Username:\n")
- password = input("Password:\n")
- if username == "Leeman" and password == "leeman123":
- menu()
- else:
- print("Sorry System Cannot Be Accessed")
- def menu():
- print("----------MAIN MENU----------")
- print("1. Store + enter student details")
- print("2. Dispay details of any student")
- print("3. Run1 - Show all students in my form")
- print("4. Run2")
- print("5. Run3")
- print("6. Exit")
- loop = True
- while loop:
- menu()
- choice = int(input("Enter Number of Choice Here: "))
- if choice == 1:
- student = []
- n = int(input("How any students would you like to add?"))
- for count in range(0, n):
- idNum = int(input("ID Number:\n"))
- surname = input("Surname:\n")
- forename = input("Forename:\n")
- dob = input("D.O.B (dd/mm/yyyy):\n")
- while "/" not in dob:
- dob = input("D.O.B (dd/mm/yyyy):\n")
- address = input("Address:\n")
- homeNum = int(input("Home Number:\n"))
- gender = input("Gender(M/F):\n")
- while gender not in "MF":
- gender = input("Gender(M/F):\n")
- tGroup = input("Tutor Group:\n")
- email = input("School Email\n")
- while "@tree-road.me.uk" not in email:
- email = input("School Email\n")
- student.append(idNum)
- student.append(surname)
- student.append(forename)
- student.append(dob)
- student.append(address)
- student.append(homeNum)
- student.append(gender)
- student.append(tGroup)
- student.append(email)
- elif choice == 2:
- option = int(input("Enter the number of the student you wish to see:\n\n"))
- print(student[option])
- elif choice == 7:
- loop = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement