Untitled

 avatar
unknown
python
2 years ago
895 B
5
Indexable
def console():

    users_input = input("Choose a number between 1-7: ")

    if users_input == '1':
        service.show_students_list()
        console()
    elif users_input == '2':
        students_id = input("Type students' ID: ")
        service.show_student_by_id(students_id)
        console()
    elif users_input == '3':
        new_student = Student.Student(input("Name: "), input("Surname: "))
        service.add_student(new_student)
        console()
    elif users_input == '4':
        service.update_student(input("Provide student's ID: "), input("Student's updated name: "), input("Student's updated surname: "))
        console()
    elif users_input == '5':
        service.delete_student(input("Provide student's ID to remove: "))
        console()
    elif users_input == '6':
        pass
    elif users_input == '7':
        exit()

print('------------------')

console()
Editor is loading...