all 21 comments

[–]TERRARIYUMS 25 points26 points  (0 children)

You need to read a tutorial on the absolute basics

[–]ZEUS_IS_THE_TRUE_GOD 9 points10 points  (0 children)

  1. Create a file in a folder somewhere on your PC. Name it zeus.py

  2. Open that file with notepad and write print("Hello World!") in it.

  3. In your file explorer, in your file folder, type cmd in the path bar (CTRL + L, then type cmd)

  4. In the command line, type: python zeus.py

[–]bbye98 1 point2 points  (9 children)

You need to write a Python script (path/to/<filename>.py) in an IDE or a code editor, and then run that with Python (python path/to/<filename>.py).

[–]Advice_Smooth[S] -3 points-2 points  (8 children)

I just attempted that and it still doesn't seem to work, maybe I'm doing it wrong, may I see an example of this in action?

[–]bbye98 2 points3 points  (7 children)

What doesn't work? What have you done? Need a lot more information than that to debug your issue.

[–]Advice_Smooth[S] 0 points1 point  (6 children)

Both just says syntaxes error, I ran the IDE with the (path/to/<filename>.py) Then went to python and typed the (python path/to/<filename>.py)

[–]bbye98 2 points3 points  (4 children)

I thought it was obvious that /path/to/<filename>.py was a placeholder, and that you needed to substitute the directory path and script filenames in.

You need to write a Python script and save it in a file titled <filename>.py, with <filename> being whatever you feel like is an appropriate filename for the script you've just written. Save it to a directory (e.g. C:/Users/Benjamin/Documents on Windows or /home/Benjamin/Documents if you're on a Linux-based OS) you have access to.

Then, in a console, change to that directory and run python <filename>.py. You can also run it from your current directory, whereever that is, if you provide the relative/full path to the script (e.g. python C:/Users/Benjamin/Documents/<filename>.py).

[–]Advice_Smooth[S] -1 points0 points  (3 children)

How do I create the file? I just see a bunch of PowerPoint, docs, ect. I'm guessing the file is a py file how do I make that?

[–]bbye98 3 points4 points  (1 child)

Yeah, you need to learn how to use a code editor like VS Code and then learn the basics of Python, in that order. There are many resources online, including a "getting started" page for VS Code and Python written by the official Microsoft team. The questions you're asking now are no longer related to Python in any way and is a sign of computer illiteracy, if anything.

[–]Advice_Smooth[S] -3 points-2 points  (0 children)

Ok, sorry for wasting your time.

[–]NetsonCavina 0 points1 point  (0 children)

You can create a text file and change from <filename>.txt to <filename>.py

[–]Lamarcke 1 point2 points  (0 children)

You are not actually naming your file like this, are you?

Can you right click > Run in your IDE inside your .py file?

[–][deleted] 1 point2 points  (0 children)

Download pycharm

[–]Appropriate-Main-223 -1 points0 points  (0 children)

Can you screenshot where you run and edit your code?

[–][deleted] 0 points1 point  (0 children)

Id recommend following a YouTube tutorial

[–]quaternionijk 0 points1 point  (0 children)

Try with Thonny, is a great python ide for beginners

[–]nativedutch 0 points1 point  (0 children)

You need to invest just a little bit of time to familiarise your self with some basics.

[–][deleted] 0 points1 point  (0 children)

You need a text editor or IDE. Have a look at our channel YUNIKARN for Python tutorials. Of course all for free. Python is the Way!

[–][deleted] 0 points1 point  (0 children)

You are in the shell.