Esempio n. 1
0
def run_example():
    students = data_generator.generate_students()
    school = School(name="Hogwart", students=students)
    print(school)

    new_students = data_generator.generate_students(number_of_students=8)
    school.students = new_students
    print(school)

    too_many_students = data_generator.generate_students(
        number_of_students=100)
    school.students = too_many_students
    print(school)
Esempio n. 2
0
def run():
    students = data_generator.generate_students(number_of_students=45)
    school = School(name="Mała szkoła", students=[])
    school.students = students
    print(school)

    student_avg = GradeCalculator.calculate_student_avg([])
Esempio n. 3
0
def run():
    students = data_generator.generate_students()
    school = School("Moja szkoła", students)
    # print(school)
    #
    # new_students = data_generator.generate_students(8)
    # school.students = new_students
    # print(school)

    too_many_students = data_generator.generate_students(100)
    school.students = too_many_students
    print(school)
Esempio n. 4
0
def run():
    # student = Student("Mariusz", "Baran")
    # try:
    #     print(student.grades_avg)
    # except LogicError as error:
    #     print(f"{error}")

    students = generate_students(250)
    school = School("Szkoła", [])
    try:
        school.students = students
    except PlacesLimitError as error:
        print(f"{error}")
Esempio n. 5
0
def run_example():
    # student = Student(first_name="Bob", last_name="Bobowski")
    # try:
    #     print(student.grades_avg)
    # except LogicError as error:
    #     print(f"Błąd: {error}")

    students = data_generator.generate_students(number_of_students=250)
    school = School(name="Mała szkoła", students=[])
    try:
        school.students = students
    except PlacesLimitError as error:
        print(f"Limit miejsc wynosi: {error.places_limit}")
Esempio n. 6
0
def run():
    students = data_generator.generate_students(number_of_students=250)
    school = School(name="Mała szkoła", students=[])
    school.students = students
    print(school)
Esempio n. 7
0
def run_example():
    students = data_generator.generate_students(number_of_students=45)
    school = School(name="Mała szkoła", students=[])
    school.students = students