Help I just don't know what went wrong!


This popped up Oops, try again. by_three(2) returned True instead of False

I expected Success

def cube(number):
    return number**3

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


your if condition is wrong, if the remainder of number divided by three is zero you should return the cube of the number

your if condition checks if the remainder of 3 divided by number. not really logic.


Firstly, you can check the code system on the hint how the dividing 3 is done. Then, you should correct first return of by_three. Secondly , you check again on fourth instroduction. Then it will be done.


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