Python - Introduction

Python

Share
python logo

This is an introduction to Python programming language.

What is Python?

Python is a high level, interpreted and object oriented programming language created by Guido van Rossum and was released back in 1991.

Use of Python

Python has many applications and some of which are listed below.

  • Developing web application (server side)
  • Software development
  • Data Science
  • AI - Artificial Intelligence
  • ML - Machine Learning
  • Game
  • Scripting

Python 2 and Python 3

Python 3 is the latest version though, version 2 is still widely used and popular.

We will be using the latest version of Python for this tutorial series which is Python 3.x.

How to install Python?

Visit python.org and download the latest version of Python as per your Operating System. This will install the required Python interpreter on your machine.

Python on Mac

For Mac users chances are that you already have Python interpreter installed on your machine. Open Terminal and type python and you will see the Python prompt >>>.

$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

To come out of the interpreter type exit() and hit enter.

If you don't have Python 3 then head over to Python website and get yourself the latest version.

Python on Linux like Ubuntu

Run the python command in the terminal to check if you have it installed on your machine.

If you don't have Python installed then run the following command to install it.

$ sudo apt install python

Now run the python command and you will get the prompt.

$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

To install Python 3 run the following command.

$ sudo apt install python3

Python on Windows

Head over to Python website and download the latest verion for your OS version.

IDE

For IDE (Integrated Development Environment), download PyCharm the Community edition by JetBrains. It's free and you can get it for both Mac and Windows.

Text Editor

We can also use text editor like Sublime Text, Atom, NotePad++ to write Python code. You may not get all the features of an IDE like PyCharm but it will still get the job done.

More softwares to write Python code

You can also use Eclipse and NetBeans to write Python code. You may have to install plugins to get started.

Also, check out Microsoft Visual Code. It has plugins to help you write Python code.

The .py extension

We save python code in a file having .py extension.

Example: HelloWorld.py

Alright this brings us to the end of this introduction tutorial. Head over to the next tutorial were we will learn to write our first Python program.

See you in the next tutorial. Have fun coding.

Share