Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ostertag(jahr):
- a = jahr % 19
- b = jahr % 4
- c = jahr % 7
- k = jahr // 100
- p = (8*k + 13) // 25
- q = k // 4
- M = (15 + k - p -q) % 30
- N = (4 + k - q) % 7
- d = (19*a + M) % 30
- e = (2*b + 4*c + 6*d + N) % 7
- if d + e == 35:
- ostern = 50
- elif all([d==28, e==6, ((11*M + 11) % 30) < 19]):
- ostern = 49
- else:
- ostern = 22 + d + e
- return ((ostern-31), "April") if ostern > 31 else (ostern, "Mรคrz")
- jahr = int(input("Von welchem Jahr wollen Sie das Osterdatum wissen? "))
- print("Im Jahr {} wird Ostern am {}. {} sein".format(jahr,ostertag(jahr)[0],ostertag(jahr)[1]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement