I have just started to learn coding with Python. I was following instructions from the tutorials on Coursera and I am encountering an issue with defining the basic functions in Python.
My code is as follows:
>>>
>>> def f(x):
return x*2
f(3)
SyntaxError: invalid syntax
>>>
>>>
I am using the following Python package:
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
The same code displayed on the tutorial seems to be working fine wherein Python 3.2.3 is being used. Appreciate some advice.