In this short guide, you’ll see how to download and install Python from scratch. You’ll also learn how to run a simple code in Python.
Here are the steps that you may follow.
Steps to Download and Install Python on Windows
Step 1: Download Python
To start, go to python.org/downloads and then click on the button to download the latest version of Python.
Step 2: Run the .exe file
Next, run the .exe file that you just downloaded, and then follow the installation instructions.
Note that depending on your needs, you may also check the box to add Python to the Path:
Add Python to PATH
Step 3: Run a code in Python
You can run a code in Python via the Python IDLE.
A quick way to find your Python IDLE on Windows is by clicking on the Start menu. You should then see the IDLE under “Recently added.”
Once you click on the Python IDLE, you’ll see the “Shell” screen. Click on File and then select New File (alternatively, you may use the keyboard shortcut of Ctrl+N).
You’ll then see the “untitled” box, where you can type your Python code. For example, type/copy the following code that would print the famous expression of “Hello World”
Press F5 on your keyboard. You’ll then get a message to save your code – Press OK.
Choose a location where the Python file would be saved on your computer. You’ll also need to type a name for your file. For instance, type “Test” for your file name.
Once you’re done, press Save, and you’ll see the “Hello World” expression printed on your Python Shell: