From 9b2be607a1b5c25c15a2750a1bde377e85b9c508 Mon Sep 17 00:00:00 2001 From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de> Date: Tue, 29 Apr 2025 09:03:01 +0200 Subject: [PATCH] add doc --- 03-funktion/gauss-ostern.py | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/03-funktion/gauss-ostern.py b/03-funktion/gauss-ostern.py index cfae15c..6b03009 100644 --- a/03-funktion/gauss-ostern.py +++ b/03-funktion/gauss-ostern.py @@ -10,10 +10,12 @@ print("Eingabe ist keine Zahl") -# calc_oster_sunday -# argument : Jahresnummer -# rückgabe: tage im märz -def calc_oster_sunday(year: int) -> (int,int): +def calc_easter_sunday(year: int) -> (int, int): + """ + calculate the Easter sunday of a year in Gregorian Calendar system. + :param year: valid year number + :return: tupel of (day, month) + """ a = year % 19 k = year // 100 m = 15 + (3*k + 3) // 4 - (8*k + 13) // 25 @@ -32,7 +34,7 @@ monat = 4 return (tag,monat) -tag,monat = calc_oster_sunday(x) +tag,monat = calc_easter_sunday(x) months = (None, "Jan", "Feb", "März", "April") -- Gitblit v1.10.0-SNAPSHOT