6/19 i need help... i can't understand what's wrong in this


  • Instead of using 'n' I actually wrote 'number' (not sure if this matters)
  • for your first first I would remove the 2nd line of code and write in its place 'return number**3' (or in your case 'return n**3')
  • for your second function you need to bring back the 'else' a few spaces so its in line with 'if'
  • I don't think there's any need for the 'n = raw_input'

Here's what mine looked like:

def cube(number):
--->return number**3

def by_three(number):
--->if number % 3 == 0:
------->return cube(number)
------->return False


first on line 2. you are calling on the function itself again. you should call on the parameter (n), so n**3 or n(n(n)). on line three it needs to return the parameter not the function.
on line 10 you don't need to make n a variable.


oh thank you ... the matter was that I put "else" in another position