title: How do I solve the leap year function in Python for Hackerrank?
body: <p>I cannot for the life of me solve this challenge on Hackerrank. The closest I got it was to 4/6 passes.
  Rules:
  In the Gregorian calendar three criteria must be taken into account to identify leap years:</p>
  <pre><code>The year can be evenly divided by 4, is a leap year, unless:
      The year can be evenly divided by 100, it is NOT a leap year, unless:
          The year is also evenly divisible by 400. Then it is a leap year.
  </code></pre>
  <p>Code:</p>
  <pre class="lang-py prettyprint-override"><code>def is_leap(year):
      leap = False
      
      # Write your logic here
      if year%400==0 :
          leap = True
      elif year%4 == 0 and year%100 != 0:
          leap = True
      return leap
  
  year = int(input())
  print(is_leap(year))
  </code></pre>