[Tutor] Python code

Cameron Simpson cs at cskk.id.au
Thu Aug 1 18:10:05 EDT 2019


On 01Aug2019 15:23, Spencer Wannemacher <reavervoid at outlook.com> wrote:
>I'm new to python and I was trying to perform a simple one code. All 
>that is included in the code is print(61). I save it as 61.py and 
>change the directory before typing in python 61.py and I don't get an 
>output. There is no error and the output is blank. Please let me know 
>what I'm doing wrong. Thank you so much!

Can you confirm that your entire "61.py" file is this:

  print(61)

That should print a "61" on the output, as I think you expected.

Can you confirm your operating system? I'm guessing Windows, but a 
detailed description would be helpful.

Are you are typing "python 61.py" at the shell prompt (I presume 
Windows' CMD.EXE prompt)? And not to some other interface?

It is my recollection that "python" isn't a command under windows, 
there's a "py" command (I'm not on Windows here). So it may be that when 
you issue the command "python" it isn't running the Python interpreter 
but something else.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Tutor mailing list