Practice makes perfect


Can some one please tell me why this code is not working and throwing the error: Oops, try again. cube(1) returned 'number**3' instead of 1. Thank you.
Replace this line with your code. def cube(number):
    return "number**3"
def by_three(number):
    if (number%3)==0:
       return "cube(number)"
        return False


return "number**3"

what do you expect from this line of code?
same question for

return "cube(number)"


Got it .Thanks!:slight_smile:


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