Practice makes perfect secsion something i had ignor is whitespaces are counting on Python


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

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


In the last line return False.
You introduced a dot!
That's why it is throwing an error!
I hope it helps!:slight_smile:


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.