Hong-Phuc Bui
2024-06-17 689ada49c2f083fcb3a2eeafc2ac15954ed64eca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from typing import Final
 
lecture_time: Final[int] = 15
ects_effort: Final[int] = 30
 
 
def lecture_effort(lecture_pre_week, ects):
    """
    :param lecture_pre_week: wie viel Veranstaltungen hat eine Vorlesung in der Woche
    :param ects: Anzahl der ECTS der Vorlesung
    :return:
    """
    effort_in_time = ects * ects_effort
    effort_per_week = effort_in_time / lecture_time # how many hours for a week
    return effort_per_week - (lecture_pre_week * 1.5)
 
 
def format_lecture_effort(name, lecture_count, ects, effort):
    return f"Für die Vorlesung {name} mit {ects} ECTS und {lecture_count} Veranstaltung pro Woche brauchen Sie {effort} Stunden zu lernen."