Learning Python- Basic course: Day 1, Introduction and Installation
Tags: python, tutorial, learningpython
Published: 2021-06-20 07:55:30

**Introduction to Python**
Python is a general-purpose programming language. It is best suited for 'data' related  applications like Data Mining, Machine learning and data extraction. But we can also use it for a variety of other purposes. Nowadays, any application, from websites to Mobile applications can be built using Python. 
You might be surprised to know that Python totally different from C++ or Java. Python doesnt have those spooky curly brackets. Gone! No trailing semicolons and no header files! Python code is designed to be as easy and simple as possible. Small code yet great results. Why, the hello world program in Python is just a one liner!
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/auokedxr3wihn9y65784.png) 

What's more, Python doesnt have data types! You can store an integer, string or character in the same variable! This is what makes Python a really mysterious language. 

So, next time you right Python code, dont' forget to thank Guido Van Rossum. This Dutch programmer invented the Python language. It was he who gave Python this unique and mysterious name.
![guido-van-rossum-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cvjcfk5zd8u7jbpnfiwm.jpg)
 

**Advantages of Python**
1) *Easy to learn*- Python is the easiest of all languages to learn.

2) *Developer Friendly Syntax*- Python's syntax is easy to understand, unlike the cryptic C commands.

3) *Free and Open source* -Being open source, we can create our own modules in Python

4) *Object Oriented Programming support*- Python has Strong OOP support, but unlike Java or C++, OOP is not a strict compulsion.

5) *Python is interpreted and not compiled*- Python interpreter highlights one error at a time. Whereas compiled languages like C's take the whole at code once. Interpreted languages are easier to Debug, though a bit lagged. More about it [here](https://www.geeksforgeeks.org/difference-between-compiled-and-interpreted-language/#:~:text=A%20compiled%20language%20is%20a%20programming%20language%20whose%20implementations%20are,program%20into%20machine%2Dlanguage%20instructions.).

6) *Python is highly portable*- Python is a device independent language. Like Java, It can be run on any device (Linux, windows, mac or any other) with the same code.
 
7) *Python is both a strongly typed and a dynamically typed language* Variables are declared in run time and not in advanced, making it most dynamic and most flexible. (More about it [here](https://www.futurelearn.com/info/courses/python-in-hpc/0/steps/65121)). However, this flexibility may confuse the programmer too!

8) *Extensive collection of libraries* Python has a huge volume of previously built in libraries which we can just plug and play!

9) *Multilanguage support*-Python supports other languages like Java and C++

**Disadvantages of Python**
1) *Python not close to the hardware*- The device specific features which C's offer are not in Python. This is why it cannot be used in high precision applications.
2) *Python is slower than C's*- Due to being far from the hardware, some functionalities in Python make it slower than C. You can make other languages (like Python itself) using C/Java but Python can't go so fundamental. This is because it is designed for Data specific applications.

---
Before we begin learning Python, we must set it up on our devices.

**Steps for setting up Python:**

1) *Download Python from [here](https://www.python.org/downloads/)
 ![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/152igvqfhthgsqbndf81.png)*
    
2) *Install Python with standered installation process.*
Try to avoid making any customization in it. 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44pvb40nm5omyl0ttmqp.png)
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9tkvx1wj781l155b8l4.png)
 
3) *Opening IDLE/IDE*

After installing Python, you can use IDE's like [PyCharm](https://www.jetbrains.com/pycharm/) or any [others](https://www.programiz.com/python-programming/ide). ![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0k1uvb11d1mvftmr9jo.png)
 

Python can also be run on the command prompt by typing the command  
 "py"
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/af4muik7ayqfi7v0vqck.png)

Another alternative way of running Python is by searching IDLE (in win search-bar) according to the version you downloaded
 search "IDLE (Python 3.9 64-bit)"
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dzdqf8n5lbxaq12a7jbn.png)

This opens up the Python IDLE
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41gyv2gegsxbi6wiueku.png)

Python can also be run on online web based interpreters like [this one.](https://www.onlinegdb.com/online_python_compiler)


Additional information for setting up Python can be found [here](https://github.com/Aatmaj-Zephyr/Learning-Python/blob/2f66c25d028eb1439b0705c60ba44bd48c00b6bf/Basic/Day%201/python_environment.pdf).

A few conceptual exercises on this topic are provided [here](https://github.com/Aatmaj-Zephyr/Learning-Python/blob/2f66c25d028eb1439b0705c60ba44bd48c00b6bf/Basic/Day%201/Exercises)

*To be continued....*
***
For any suggestions or doubts, please comment below, and I will be happy to help :-)
*Happy Python programming!!*