-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunner.py
24 lines (21 loc) · 952 Bytes
/
runner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from classes.school import School
school = School('Ridgemont High')
while True:
mode = input("\nWhat would you like to do?\nOptions:\n1. List All Students\n2. View Individual Student <student_id>\n3. Add a Student\n4. Remove a Student <student_id>\n5. Quit\n")
if mode == '1':
school.list_students()
elif mode == '2':
student_id = input('Enter student id:')
student_string = str(school.find_student_by_id(student_id))
print(student_string)
elif mode == '3':
student_data = {'role':'student'}
student_data['name'] = input('Enter student name:\n')
student_data['age'] = input('Enter student age: \n')
student_data['school_id'] = input('Enter student school id: \n')
student_data['password'] = input('Enter student password: \n')
school.add_student(student_data)
elif mode == '4':
student_data
elif mode == '5':
break