Practice makes perfect


Replace this line with your code.


I keep trying this but cothing works, what do i do?


your cube function should return the cube (^3) of of number, not return the function itself


That is partly my fault, I apologize. In my original response to you I didn't notice that portion of the code. Try to remember the usage of **.


3 posts were split to a new topic: Practice makes perfect


My code was

def cube(number):
            return cube
    def by_three(number)
         if number % 3 == 0:
               print "%s is divisible by 3" % (number)
                print "%s is not" % (number)

I've trouble shooted a few problems and can't find an explanation.
I am not that good at codecademy, though.:confounded:


are you sure the code you posted here is correctly indented?


Thanks! That helped, sort of. :smirk:


okay, let me know if you need more help, post an updated version of your code, question and error message


hey i cant find out what is wrong with my code so can some one help me?

def cube(number):
return cube
def by_three(number):
if number % 3:
return cube
return False


cube means to the power of 3 (^3), so that is what your cube function should return

to check if a number is divisible by three, the remainder should equal zero, if the number is divisble by 3 call cube to return the cube of number


5 posts were split to a new topic: [solved]practice makes perfect


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.