title: Strange multiple return values in Python
body: <p>Just 5 days into Python, learning through Code Academy. I have no knowledge of any other language (very little knowledge of Ruby!).</p>
  
  <p>What am I doing wrong with this code?</p>
  
  <hr>
  
  <blockquote>
    <p>Q: Write a function, <code>by_three</code>, that calls a second function, <code>cube</code>,
    if a number is evenly divisible by 3 and <code>"False"</code> otherwise. You should
    then return the result you get from <code>cube</code>. As for <code>cube</code>, that function
    should return the cube of the number passed from <code>by_three</code>. (Cubing a
    number is the same as raising it to the third power).</p>
    
    <p>So, for example, <code>by_three</code> should take 9, determine it's evenly
    divisible by 3, and pass it to cube, who returns 729 (the result of
    9**3). If <code>by_three</code> gets 4, however, it should return <code>False</code> and leave
    it at that.</p>
    
    <p>Lastly, call <code>by_three</code> on 11, 12, and 13 on three separate lines.</p>
  </blockquote>
  
  <p>ANS: </p>
  
  <pre><code>def by_three(n):
      orig_num = n
      if (isinstance(orig_num, int) and orig_num%3 == 0 ):
          cube(orig_num)
      else:
          print "False"
  
  def cube(orig_num):
      cube = orig_num**3
      print cube
      return
  
  by_three(11)
  by_three(12)
  by_three(13)
  </code></pre>
  
  <p>When I run the above code, here is what I get.  Why do these values appear in this way?</p>
  
  <pre><code>False
  1728
  False
  ==&gt; None
  False
  False
  1728
  Oops, try again.
  </code></pre>