Here is the problem I am working on & getting error message. Any help would be greatly appreciated. Below the problem is my code that I have written & the error message.
First, def a function called cube that takes an argument called number. Don't forget the parentheses and the colon!
Make that function return the cube of that number (i.e. that number multiplied by itself and multiplied by itself once again).
Define a second function called by_three that takes an argument called number.
if that number is divisible by 3, by_three should call cube(number) and return its result. Otherwise, by_three should return False.
Don't forget that if and else statements need a : at the end of that line!
def cube(number): return 3**3 def by_three(number): if %d divided by %d is %d, % (cube, by_three) return False
File "python", line 4
if %d divided by %d is %d, % (cube, by_three)
SyntaxError: invalid syntax
Replace this line with your code.