DEV Community

Cover image for Learning Python- Basic course: Day 1, Introduction and Installation
Aatmaj
Aatmaj

Posted on • Edited on

Learning Python- Basic course: Day 1, Introduction and Installation

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

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

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.

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). 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
image

2) Install Python with standered installation process.
Try to avoid making any customization in it.
image
image

3) Opening IDLE/IDE

After installing Python, you can use IDE's like PyCharm or any others. image

Python can also be run on the command prompt by typing the command

"py"
image

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

This opens up the Python IDLE
image

Python can also be run on online web based interpreters like this one.

Additional information for setting up Python can be found here.

A few conceptual exercises on this topic are provided here

To be continued....


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

Top comments (2)

Collapse
 
atharva100 profile image
atharva100

hey, thanks a ton for such a wonderful blog

Collapse
 
aatmaj profile image
Aatmaj

You are Welcome!