CubenumberDivided three


#1



def cube(number):
    return number==number*number*number
    
def by_three(number):
    if number%3 == 0:
      
        return cube(number)%3
    else:
        return False


Oops, try again. cube(2) returned False instead of 8

I don't know why not cube(2) return to false according to this definition

Replace this line with your code.


#2

can you provide the exercise url?

here:

return number==number*number*number

why do use check if is equal (==)? You just need to return the cube (^3) of number

and here:

return cube(number)%3

why use %3? You just need to return cube of number


#3

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