bf0dd3f17baf1b4c655b823f9b9c1f0b0364a503..f5e4005e007eb00c750b24095046a6d5eca790f5
2025-04-29 Hong-Phuc Bui
cleanup
f5e400 diff | tree
2025-04-29 Hong-Phuc Bui
3.te vorlesung
cddee2 diff | tree
4 files added
67 ■■■■■ changed files
.gitignore 3 ●●●●● patch | view | raw | blame | history
03-funktion/Inhalt.md 6 ●●●●● patch | view | raw | blame | history
03-funktion/gauss-ostern.py 48 ●●●●● patch | view | raw | blame | history
canvas-bezier/.idea/canvas-bezier.iml 10 ●●●●● patch | view | raw | blame | history
.gitignore
New file
@@ -0,0 +1,3 @@
.idea/
__pycache__/
03-funktion/Inhalt.md
New file
@@ -0,0 +1,6 @@
# Funktionen
# Tupel
# Liste
03-funktion/gauss-ostern.py
New file
@@ -0,0 +1,48 @@
eingabe_ok = False
while not eingabe_ok:
    try:
        jahr_input = input("Geben Sie die Jahresnummer ein! ")
        x = int(jahr_input)
        eingabe_ok = True
    except:
        print("Eingabe ist keine Zahl")
# calc_oster_sunday
# argument : Jahresnummer
# rückgabe: tage im märz
def calc_oster_sunday(year: int) -> (int,int):
    a = year % 19
    k = year // 100
    m = 15 + (3*k + 3) // 4 - (8*k + 13) // 25
    d = (19*a + m) % 30
    s = 2 - (3*k + 3) // 4
    r = (d + a // 11) // 29
    og = 21 + d - r
    sz = 7 - (year + year//4 + s) % 7
    oe = 7 - (og - sz) % 7
    os = (og + oe)
    if os <= 31:
        tag = os
        monat = 3
    else:
        tag = os-31
        monat = 4
    return (tag,monat)
tag,monat = calc_oster_sunday(x)
months = (None, "Jan", "Feb", "März", "April")
print(f"Der Ostersonntag im {x} ist am {tag}ten {months[monat]}.")
canvas-bezier/.idea/canvas-bezier.iml
New file
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$">
      <excludeFolder url="file://$MODULE_DIR$/.venv" />
    </content>
    <orderEntry type="jdk" jdkName="Python 3.10 (canvas-bezier)" jdkType="Python SDK" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>