bubbles8935716 wrote:Can anyone tell me what's wrong?
My guess is that you clicked on the menu entry for Python3. This will have started the Idle3 IDE. You then typed your code into the resulting Python Shell window and saved it. If you examine your code it probably looks like this:
Code: Select all
pi@RPi2B ~ $ cat hello.py
Python 3.2.3 (default, Mar 1 2013, 11:53:50)
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> print("hello!")
hello!
>>>
This will, as you have found, not run correctly when you pass it to the python3 interpreter.
If you want to use Idle3 as the editor for your python scripts, DO NOT type them in the Python Shell window. Use the FILE menu in that screen to OPEN a New Window - initially headed Untitled - and use that window to create and save your script.