#! /usr/bin/evn python
|
|
"""
|
Programm zum Berechnen den Aufwand für das Selbststudium pro Woche in einem Semester.
|
|
Das Semester hat 15 Woche.
|
Eine Doppelstunde (DS) entspricht 90 Minuten. Ein ECTS entspricht einen Aufwand von 30 Stunden.
|
Eine Veranstaltung (Vorlesung, Übung, Tutorium) ist 2 DS.
|
Die Vorlesungen in einem Semester werden in einer Text-Datei erfasst. Ein Template ist wie folgt:
|
|
```txt
|
#Name; ECTS; Veranstaltung pro Woche
|
Programmierung 2; 5; 2
|
Mathematik 2; 5; 3
|
```
|
|
Usage:
|
|
$python effort_semester.py Vorlesungen.txt
|
Vorlesung ECTS V-Ü-T/Woche Selbstudiumszeit pro Woche
|
Programmierung 2 5 2 <>
|
Mathematik 2 5 3 <>
|
--------------------------------------------------------------------------------
|
<>
|
"""
|
import sys
|
from typing import Final
|
|
SEMESTER_LENGTH: Final[int] = 15 # 15 Woche pro Semester
|
|
|
def collect_lectures_from_file(lecture_filename:str) -> list[tuple[str, float, float]]:
|
# Your code here
|
pass
|
|
|
def compute_semester_effort(lectures: list[tuple[str, float, float]]) -> list[tuple[str, float, float, float]]:
|
# Your code here
|
pass
|
|
|
def print_effort(effort: list[tuple[str, float, float, float]]) -> None:
|
# Your code here
|
pass
|
|
|
if __name__ == "__main__":
|
lecture_filename = sys.argv[1]
|
lectures = collect_lectures_from_file(lecture_filename)
|
effort = compute_semester_effort(lectures)
|
print_effort(effort)
|