Advertisement
Guest User

Untitled

a guest
Jun 14th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.91 KB | None | 0 0
  1. def login():
  2.     username = input("Username:\n")
  3.     password = input("Password:\n")
  4.     if username == "Leeman" and password == "leeman123":
  5.         menu()
  6.     else:
  7.         print("Sorry System Cannot Be Accessed")
  8.  
  9.  
  10. def menu():
  11.     print("----------MAIN MENU----------")
  12.     print("1. Store + enter student details")
  13.     print("2. Dispay details of any student")
  14.     print("3. Run1 - Show all students in my form")
  15.     print("4. Run2")
  16.     print("5. Run3")
  17.     print("6. Exit")
  18.  
  19. loop = True
  20.  
  21. while loop:
  22.     menu()
  23.     choice = int(input("Enter Number of Choice Here:  "))
  24.     if choice == 1:
  25.         student = []
  26.         n = int(input("How any students would you like to add?"))
  27.         for count in range(0, n):
  28.             idNum = int(input("ID Number:\n"))
  29.             surname = input("Surname:\n")
  30.             forename = input("Forename:\n")
  31.             dob = input("D.O.B (dd/mm/yyyy):\n")
  32.             while "/" not in dob:
  33.                 dob = input("D.O.B (dd/mm/yyyy):\n")
  34.             address = input("Address:\n")
  35.             homeNum = int(input("Home Number:\n"))
  36.             gender = input("Gender(M/F):\n")
  37.             while gender not in "MF":
  38.                 gender = input("Gender(M/F):\n")
  39.             tGroup = input("Tutor Group:\n")
  40.             email = input("School Email\n")
  41.             while "@tree-road.me.uk" not in email:
  42.                 email = input("School Email\n")
  43.             student.append(idNum)
  44.             student.append(surname)
  45.             student.append(forename)
  46.             student.append(dob)
  47.             student.append(address)
  48.             student.append(homeNum)
  49.             student.append(gender)
  50.             student.append(tGroup)
  51.             student.append(email)
  52.     elif choice == 2:
  53.         option = int(input("Enter the number of the student you wish to see:\n\n"))
  54.         print(student[option])
  55.        
  56.     elif choice == 7:
  57.         loop = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement