213k views
17 votes
Can someone tell me how I can fix my code?

It is saying variable y is not defined?
import math

def main():

y = int( input("Enter year: "))

a = (y % 19)

b = (y // 100)
c = (y%100)

d = (b //4)
e = (b%4)

g = ((8 * b + 13)//25)

h = ((10 * a + b - d - g + 15)% 30)

j = (c // 4)
k = (c%4)

m = ((a + 11 * h)//319)

r = ((2 * a + 2 * j - k - h + m + 32)% 7)

n = ((h - m + r + 90) // 25)

p = ((h - m + r + n + 19)% 32)

print("Easter Sunday will be on day {} of the month {}," ,format(p,n))

main()

1 Answer

9 votes

I think the answer is a = (y % 19)

b = (y // 100)

c = (y%100)

d = (b //4)

e = (b%4)

User Marlon Dias
by
3.7k points