我不知道出了什么问题。我告诉我在哪里有一个字符串格式错误,a = y % 19
然后它还告诉我在调用main()
. 不知道如何解决这个问题,因为我似乎main()
正确地调用了该函数并且string
看起来很好。
def main():
y = input("Enter year: ")
print ("y = ", y)
a = y % 19
print ("a = ", a)
b = y / 100
print ("b = ", b)
c = y % 100
print ("c = ", c)
d = b / 4
print ("d = ", d)
e = b % 4
print ("e = ", e)
g = (8 * b + 13) / 25
print ("g = ", g)
h = (19 * a + b - d - g + 15) / 30
print ("h = ", h)
j = c / 4
print ("j = ", j)
k = c % 4
print ("k = ", k)
m = (a + 11 * h) / 319
print ("m = ", m)
r = (2 * e + 2 * j - k - h + m + 32) % 7
print ("r = ", r)
n = (h - m + r + 90) / 25
print ("n = ", n)
p = (h - m + r + n + 19) % 32
print ("p = ", p)
print ("In ", y, "Easter Sunday is on", p,)
if (n == 3):
print ("March")
if (n == 4):
print ("April")
main()