How to get started with Python ?

By  Nishant Tiwari    10 - 21 August, 20
how-to-get-started-with-python

Share article on social media


Python is a general-purpose, easy to use, and very powerful programming language. It is an open-source language and was created by Guido Van Rossum. It is a cross-platform language and works on Windows, Linux, Mac, etc. It is used in artificial intelligence, machine learning, web development, game development, etc. You can also create GUI user interfaces in Python using Tkinter, PyQt5, wxPython, etc. It is also an object-oriented programming language. The code which is written on Python is easy to read because it looks similar to the English language. It can be easily integrated with other programming languages such as C, C++, Java, etc. It also provides huge libraries such as Numpy, TensorFlow, Requests, OpenCV, Django, Theano, Pandas, Matplotlib, NLTK, etc. There are many big companies that are using python for their products and services such as Google, Facebook, Instagram, Spotify, Quora, Netflix, Dropbox, etc. Nowadays, there is a lot of demand for Python developers in web development, machine learning, data science, automation, etc. If you are new in programming then python is best for you to learn as compare to other programming languages because as we know it is easy to understand and the syntax is written in simple English language. Let's take an example to print hello world in C++, Java, and Python to understand why you choose Python as your first programming language.

In C++

#include
using namespace std;
int main()

{

        cout<<"hello world";

        return 0;

}

In Java

class HelloWorld {

   public static void main(String[] args) {

      System.out.println("Hello, World!");

   }

}

 

In Python

print("hello world")

easy right?  In python you just need to write one line for printing a  text as compared to other programming languages, that's why Python is easy and good for beginners to start.

HOW TO DOWNLOAD AND INSTALL PYTHON?

1) First, open https://www.python.org/downloads/ and download the latest version of python

2) After downloading open the setup and click on Install Now but don't forget to tick Add Python x.x to PATH


 

 

3) After installation, open your Command Prompt, type python and press enter, if you see something like Python 3.x.x........ then python is successfully installed on your computer.


4) If you want to print hello world in command line just type print("hello world") after >>>


5) You can also use Python as a calculator just type your queries (ex: 23+43) and it prints the respected output


6) Now you can open python shell just by typing idle in the start menu, in python shell (also known as Python Interactive Shell) we can execute single python commands like print("hello world") and also used as a calculator or other things


7) To execute multiple statements, create a Python file just by pressing Ctrl + N or click on the file menu and then create a new file and save it


8) Now, you can write multiple statements in the python file ex:


9) To display the output press F5 or Click on Run and then Run Module


If you want to learn Python then first strengthen the basics of Python like variables, operators, comments, data types, typecasting, string slicing, etc then, learn about decision making and control flow like if/else, while loop, for loop and other things, and then learn about object-oriented programming, and also try to create a small python projects like leap year finder, prime number finder, even or odd, etc. It really helps you to explore and learn more about python.

TRY IT:  type "import this" in your Python IDE and you will find a poem 😅

This is How to get started with Python, I hope you learned something new today. so keep learning !!!