[Tutor] Syntax error

Cameron Simpson cs at zip.com.au
Thu Jan 7 21:46:02 EST 2016


On 07Jan2016 13:15, Sarah Rasco <sarah.a.rasco at gmail.com> wrote:
>Alan - I realized I did that right after I sent this email. However, I
>can't run it in the windows or python prompts.
>
>Here is my document:
>[image: Inline image 1]
>When I try to run it in the windows prompt I get:
>[image: Inline image 2]
[...]

Hi Sarah,

The tutor list and the main python-list strips attachments, so we cannot see 
your images.  Please cut/paste the text as text instead of using screenshots.

>> I also tried to run it in my windows command prompt. I put in cd C:\python
>> and it gave me the python prompt.

I think you're misreading the Windows command prompt which recites the current 
folder. This:

  C:\python>

is still the Window command prompt. It is also probably not where you should do 
your python work unless you personally made this folder specially. Where did 
you save your "hello.py" file? That is probably where you should cd.

>>Then, when I tried to open the file by
>> typing python hello.py, I was given a syntax error again. Does anyone have
>> any suggestions as to what the problem could be?

Please cut/paste the text of your hello.py file and a complete transcript of 
the syntax error (all the lines).

Thanks,
Cameron Simpson <cs at zip.com.au>


More information about the Tutor mailing list