Hong-Phuc Bui
2026-05-12 c49c965e74cd04f379babf9a6eb32d0923b0fcb4
Dokument
1 files modified
7 ■■■■■ changed files
uebungsblatt-2/pycalendar.py 7 ●●●●● patch | view | raw | blame | history
uebungsblatt-2/pycalendar.py
@@ -40,10 +40,17 @@
def ist_schaltjahr(y:int) -> bool:
    """Ein Jahr ist ein Schaltjahr, wenn es
        * durch 4 teilbar ist,
        * und nicht durch 100 teilbar,
        * aber durch 400 teilbar ist.
    """
    return (y % 4 == 0) and ( (y%100 != 0) or (y%400 == 0) )
def letzter_tag(m: int, y:int) -> int:
    """Berechne den letztenn Tag eines Monat in einem Jahr
    """
    tage = [None, 31, 28, 31, 30, 
    31, 30, 31, 31, 
    30, 31, 30, 31]