Personal blog

Writing every week about programming, new technology and books.

PYTHON

How to install Python and run you first line of code

20-Mar-2020
How to install Python and run you first line of code

1. First step: Official python website

- Go to https://www.python.org/

- Click on the downloads section.

- Download Python's latest release.

 

2. Second step: Install Python

- Click on the file you just downloaded and begin the installation.

Python install

-Make sure you check Add Python to Path before you proceed with the installation.

-When this installation is finished you will have Python successfully installed on your machine.

 

3. Third step: Run your first Python code

- Open your favorite text editor and create a helloworld.py file (you can name it however you want it this is just example).

- Inside file type:

print("Hello world")

- Save the file and open command prompt where you made your python file.

Command prompt

-In my example, I made file inside the Documents folder

-When your command prompt is opened type

python helloworld.py

You should see the result after you pressed enter.

- If your code showed no errors then this means you successfully installed python on your machine and ran your first line on Python code!

Check out my other blogs where I made some more advanced stuff using Python or other programming languages.