In [2]:
#y will be the year that we input
y = int(input("Enter a year ==> " ))
#we find a by dividing y by 19 to get the remainder
a = y % 19
#we find b by dividing y by 100 to find the quotient
b = y // 100
#we find c by 100 to find the remainder
c = y % 100
#we find d by dividing b by 4 to find the quotient
d = b // 4 
#we find e by dividing b by 4 to find the remainder
e = b % 4 
#we find g by dividing b * 8 + 13 by 25 to find the quotient
g = (b * 8 + 13) // 25 
#we find h by dividing 19 * a + b - d - g + 15 by 30 to find the remainder
h = (19 * a + b - d - g + 15) % 30
#we find j by dividing c by 4 to find the quotient
j = c // 4
#we find k by dividing c by 4 to find the remainder
k = c % 4 
#we find m by dividing a + 11 * h by 319 to find the remainder
m = (a + 11 * h) // 319
#we find r by dividing 2 * e + 2 * j - k - h + m + 32 by 7 to find the remainder
r = (2 * e + 2 * j - k - h + m + 32) % 7
#we find n by dividing h - m + r + 90 by 25 to find the quotient
n = (h - m + r + 90) // 25
#we find p by dividing h - m + r + n + 19 by 32 to find the remainder
p = (h - m + r + n + 19) % 32

#printing all of them to see if their are any issues
print(y)
print(a)
print(b)
print(c)
print(d)
print(e)
print(g)
print(h)
print(j)
print(k)
print(m)
print(r)
print(n)
print(p)
Enter a year ==> 2001
2001
6
20
1
5
0
6
18
0
1
0
6
4
15
In [ ]: