Practice makes perfect


#1



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)"
    else:
        return False
     
by_three(9)


#2

return "number**3"

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

return "cube(number)"


#3

Got it .Thanks!:slight_smile:


#4

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