def cube(number): number = number**3 return number def by_three(number): if number % 3 == 0: return cube(number) else: return False.
In the last line
You introduced a dot!
That's why it is throwing an error!
I hope it helps!
thanks for your help, when I paste my code I didn't delete the dot. And my code is working well
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.