Practice make perfect


#1

when I run this code I get,"Oops, try again. by_three(1) returned 1 instead of False ".
what am I doing wrong here.

Thanks in advance.

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

#2

number / 3 == 0

lets see what that is for 1: 1 / 3 = .333334, agree? But given you divide two integers, a integer is returned so the number gets floored

try use % instead, this will give you the remainder. (this should have been covered by now), it is called the modulo operator


#3

ya, its work . thank you