Practice makes perfect


#1




Replace this line with your code.


#2

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


#3

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


#4

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 **.


#5

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


#7

My code was

def cube(number):
            return cube
    def by_three(number)
         if number % 3 == 0:
               print "%s is divisible by 3" % (number)
       else:
                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:


#8

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


#9

Thanks! That helped, sort of. :smirk:


#10

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


#11

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
else:
return False


#12

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


#13

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


#14

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