Creating Modules: I get invalid syntax error

In VSCode, I created a module Sales.py:

def calc_tax:
pass

def calc_shipping:
pass

Note: The pass statement is properly indented but that doesn’t appear on this web page.

BUT the code editor underlines colon after calc_tax and flags it as “invalid syntax” but no explanation.

Hi @DeadWorkerBee, it needs to be:

def calc_tax():
    pass

You forgot the parenthesis.

Thank you for that response.

1 Like