6. Practice Makes Perfect


#1

def cube(number):
return number * number * number

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

where is it wrong?
It says invalid syntax on line 4


#3

Also, line 4 use number instead of n


#4

I think line 4 needs a ":" after you defined the function

def by_three(number):


#5

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