TOPIC: Python Installation and Setup
Download Python
First of all we need to download python from the web browser. We can use any web browser and search
for 'Python Download' or just click this link Download (https://www.python.org/downloads/). You can download the latest
version of the python or use an older one.
After downloading the setup file, double-click on it and run it. And make sure to click on the 'add
exe to path'. Now, click on Next and finish the installation. You will now be able to run python
without any error.
Watch the video below for the installation and the setup.
Download Visual Studio Code
Now, in your browser, search for Visual Studio Download or click this link Download
(https://code.visualstudio.com/download). You can download it according to your own environment.
After downloading, run the setup file, and follow the instructions. After installing, launch the
application and in the extensions menu, search for 'Python' and 'Code Runner'. Install them one by
one, and after the installation, open the JSON settings file located at the top-right corner. Now,
add this code: '"code-runner.runInTerminal": true,' and save it. After that, close the Visual Studio
Code application and then run it again. Then, there will be no error.
Code run and check:
Now, after all the installations, we will try to check if the Python code is running or not. For
that, open a folder in VS Code and make a new file, namely, 'main.py' and then write 'print("Hello
World!")'. If we saw the output, 'Hello World!' then there are no error. If any error occurs,
comment down and let me know so that I can help you.
Let's look at some of the examples below for writing the Python Code...
Simple python program printing Hello World
print("Hello World!")
Output:
Hello World!
Python program to access the variable a and print its content
a = "This is the best python tutorial on the Internet"
print(a)
Output:
This is the best python tutorial on the Internet