title: Python Problems
body: <p>Hey guys I'm having ANOTHER problem with this python question. </p>
  
  <p>A formula for computing Easter in the <code>years 1982 – 2048</code>, inclusive, is as follows: </p>
  
  <p>let </p>
  
  <pre><code>a = year %19 
  b = year %4 
  c = year % 7
  d = (19a + 24)%30
  e= (2b + 4c + 6d + 5) % 7
  </code></pre>
  
  <p>The date of Easter is <code>March 22 + d + e</code> (which could be in April). Write a program that inputs a year, verifies that it is in the proper range, and then prints out the date of Easter that year. Additionally, write a function easterii() to do this. This function accepts no parameter and returns a value. Use a return statement.</p>
  
  <p>This is the code that I have currently. When I enter in a date it always outputs <code>"There was a problem, try again."</code> </p>
  
  <p>Any input would be appreciated, thanks.</p>
  
  <pre><code>def easterCal(year):
      a = year % 19
      b = year % 4
      c = year % 7
      d = ((19 * a) + 24) % 30
      e = ((2 * b) + (4 * c) + (6 * d) + 5) % 7
      date = 22+d+e
      return date
  
  def easterii():
      try:
          year = eval(input('Please enter a year: '))
  
          year = int(year)
  
  
          if year &lt; 1982:
              print("Year is out of range")
          elif year &gt; 2048:
              print("Year out of range")
          else:
              date = easterCal(year)
  
          if 22 &lt;= date &lt;= 31:
              print('Easter date for year {0} is March,{1}'.format(year , date))
  
          elif  32 &lt;= date &lt;= 56: 
              print('Easter date for year {0} is April,{1}'.format(year,date-31))
  
          else:
              print('Incorrect.')
  
      except NameError:
          print('Please enter date in numbers')
      except:
          print('There was a problem, try again.')
  
  if __name__ == '__main__':
      easterii()
  </code></pre>