title: NameError: name 'yearout' is not defined
body: <p>Please tell me what is wrong, and other ways it needs improving</p>
  
  <pre><code>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 &gt;= 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)
  </code></pre>
  
  <p>The Error Says: "NameError: name 'yearout' is not defined"- Please give me solution and answers to any other problems you find, and ways it could be simplified and/or improved.</p>