Getting Started with python

In order to install python on your machine go to https://www.python.org/downloads/ , and download the latest python version for your system and install it on your machine. The current version is python 3.8.3 as of preparing this tutorial.

Figure: python installation wizard in windows.

Note: Don’t forget to check Add Python to Path, this check box will add python in you path and you can type python in command prompt and access python shell.

To verify that python has been successfully installed in your system open up terminal(in linux) or command prompt(in windows) and write “python –version”( note write the letter inside the quote without quote), this will give you the version installed. 

Code Editor

We need to write our python source code using an editor. You can use any editor like Notepad++, Atom, VSCode, PyCharm, etc. For this course I would recommend you to use VSCode as it is free and comes with tone of feature. To download and install VSCode go to https://code.visualstudio.com/Download, download the suitable version and install it.

Figure: VSCode code editor.

Writing and running python file:

You can start the VSCode and create new file save the file in .py extension(this is what python file look like) and write your code in it.

To run you file you can type “python path_to_file_filename.py”  or in vs code you can install code runner extension and use it to run the python code.

Leave a Reply

Your email address will not be published. Required fields are marked *