Practice makes perfect - Indents


#1



https://www.codecademy.com/en/courses/python-beginner-c7VZg/1/5?curriculum_id=4f89dab3d788890003000096#


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
    else:
        return cube(n)
n=9
print by_three(n)


#2

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


#3

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


#4

works fine:

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


#5

It works. I am grateful for help.


#6