year = raw_input("What year were you born?: ")
def age_calc(f):
print "To calculate your age, I will subtract the current year from your birthyear!"
return 2011 - "%d" % (f)
age = age_calc(year)
print age
これは私が書いたコードの練習問題であり、これは私が回避できないエラーです...
File "agecalc.py", line 7, in <module>
age = age_calc(year)
File "agecalc.py", line 5, in age_calc
return 2011 - "%d" % (f)
TypeError: int argument required