Practice makes perfect - Indents


I have my code being approved by remote execution, but running it in IDLE gives wrong syntax notification.
Are there any specificities of syntax of multiple functions?

def cube(n):
    return n**3
def by_three(n):
    if n%3!=0:
        return False
        return cube(n)
print by_three(n)


which python version does your IDLE run? if its python3 (which i suspect it is) print requires parentheses

in python2, print is a statement, in python3 its a function call


Python 2.7.13 via IDLE.
Though, the error notification was also given for conditionals of declaring by_three.


works fine:

you have to copy it in parts, but for the rest it works fine


It works. I am grateful for help.