何が悪いのか、その他の改善が必要な点を教えてください
def finalcalc(y, d, m):
end = (y + d + m) % 7
return end
def monthlook(m):
if m == 1:
monthout = 6
elif m == 2:
monthout = 2
elif m == 3:
monthout = 2
elif m == 4:
monthout = 5
elif m == 5:
monthout = 0
elif m == 6:
monthout = 3
elif m == 7:
monthout = 5
elif m == 8:
monthout = 1
elif m == 9:
monthout = 4
elif m == 10:
monthout = 6
elif m == 11:
monthout = 2
elif m == 12:
monthout = 4
print(finalcalc(yearout, dayout, monthout))
def daysimp(d):
dayout = d % 7
monthlook(monthin)
def yearc(y):
y = y % 100
yearout = y + (y // 4)
yearrem = y % 4
if yearrem >= 2:
yearout += 1
yearout = yearout % 7
daysimp(dayin)
dayin = int(input("What day in the Month?"))
monthin = int(input("What Month Number? - Eg. January is 1"))
yearin = int(input("What Year?"))
yearc(yearin)
エラーには、「NameError: name 'yearout' is not defined」というメッセージが表示されます。その他の問題の解決策と回答、および単純化および/または改善する方法を教えてください。