Practice makes perfect


#1

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

the indents are correct but it says on console none


Practice makes Perfect
#2

can u write the whole code because I am having the same problem butt couldnt figure out the solution


#3

No, the indents are not correct. The by_three function should be after the cube function. Change the indent so the by_three function is the cube function


#4

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