title: Wrong print out statement in python 2.7
body: <p>The Question:</p>
  
  <p>5.Now write the function is_odd(n) that returns True when n is odd and False otherwise. </p>
  
  <p>Finally, modify it so that it uses a call to is_even to determine if its argument is an odd integer.</p>
  
  <p>I had to write a function for is_even(n) that returns True when n even and False otherwise. Here is my code:</p>
  
  <pre><code>def is_even(n):
      return n % 2 == 0
  
  
  
  def is_odd(n):
      if is_even(n):
          print "This is an even integer."
      else:
          print "This is an odd integer."
      return n % 2 != 0
  </code></pre>
  
  <p>My Question:
  I am a total beginner and find programming very hard but I love it for some reason, but why does this not work? I defined the function is_even(n) and is_odd(n), put is_even(n) into the is_odd(n) function, wrote and if/else else statement making if the function is_even is equal to true it should print out it is an even integer... When I put in is_odd(3); it prints out "This is an even integer" and returns True even though it should print out "This is an odd integer."</p>
  
  <p>Update:</p>
  
  <p>I changed my code to this and works fine.</p>
  
  <pre><code>def is_even(n):
      return n % 2 == 0
  
  def is_odd(n):
      if is_even(n) == False:
          print "This is an odd integer."
  
      return n % 2 != 0
  </code></pre>