I wrote the Student class, but I can't do this:
Make a list of students. Let the user add students to the list. Ask the student's name and print his / her data.
For each training course, indicate the load in hours. create a creditHours method that calculates the student’s total workload in the semester. Report overload if it is more than limitHours .
class Student: def __init__(self, name="John Doe", courses=[], phone="1", email="@"): self.name = name self.courses = courses self.phone = phone self.email = email print("Створено об'єкт для " + name) def printDetails(self): print("Ім'я: ", self.name) print("Курси: ", self.courses) print("Номер телефону: ", self.phone) print("Поштова адреса: ", self.email) def enroll(self, course): self.courses.append(course) student1 = Student("Mary", ["L548"], "066", "Mary@gmail.com") print("Уведіть курси, які вивчає ", student1.name) newcourse = input("Уведіть номер курсу або 'stop' ") while newcourse != "stop": student1.enroll(newcourse) print("Уведіть курси, які вивчає", student1.name) newcourse = input("Уведіть номер курсу або 'stop' ") student1.printDetails()