int对象不可调用

时间:2014-12-01 18:46:42

标签: python int callable

似乎无法找到问题:

def day_of_week(q,m,j,k):
    h=(q+((26(m+1))//10)+k+(k//4)+5j)%7
    return (h)

day=int(input("Enter day of month: "))
month=int(input ("Enter month: "))
year=str(input("Enter year: "))
century = year[0:-2:1]
c=int(century)
year=year[-2:]
y=int(year)
weekday=day_of_week(day,month,c,y)
print(weekday)

我的错误:

Traceback (most recent call last):
  line 42, in <module>
    weekday=day_of_week(day,month,c,y)
  line 27, in day_of_week
    h=(q+((26(m+1))//10)+k+(k//4)+5j)%7
TypeError: 'int' object is not callable

1 个答案:

答案 0 :(得分:0)

更好地阅读函数体26(m+1)

的这一部分