Topics

Getting started with Python

You are welcome to this Python tutorial for beginners programming. For some persons, this could be their first time coming across this programming language, while for some, it is for revision purposes. So, don't panic, regardless of the category you find yourself in, in the python package, you will be taught the basics. 

In addition, experienced or intermediate learners could have the advantage of picking up topics and lessons of their choice, however, we recommend you not to hurry through the topics, even though Python, although a normal programming language, have some scary parts for programmers, so we will advise you to follow each tutorial one after the other.

 

Why Python? 

Of recent, developers believe that Python is one of the most versatile programming languages. For those who have other programming language experience, you will notice the difference in course of the tutorial.

What are the Features of Python?

Below are some of the features of Python

  1. Python has simple easy-to-use syntaxes.
  2. It is window independent, that is it can run on almost any platform including Windows, Linux's all distros (All versions of Linux), MacOSX, and so on.
  3. Developers can combine the pieces of other programming languages such as C, C++, and so on, with python to utilize their respective features at the same time.
  4. With its large standard library support, real-life programming is made easier and more enjoyable.
  5. It has open-source, with huge community support working actively with Python programming.
  6. It's Object-Oriented (that is OOP or object-oriented programming), thereby making it more applicable for real-world application programming.
  7. Python language can be used for complex programs, as well as to design applications with GUI (Graphical User Interface).
  8. It is an interpreted language, i.e the interpreter executes the python code line by line and thereby making it easier to debug. 
  9. Python programming language has numerous implementations such as CPython (i.e. The Standard implementation of python), Jython (i.e. Targeted for integration with java programming language), etc.

Below is an example to show us how simple python syntax could be. In this example, we want the user to enter something from the keyboard and we want to save the value in a variable. If we use the C++ programming language, this is how the code will be written:

#include<iostream>
using namespace std;
int main(){
    int x;
    cin >> x;
    return 0;
}

Let’s use  Core Java, another programming language:

import java.util.Scanner;
class Test{
    Scanner input = new Scanner(System.in);
    public static void main(String args[]){
        int x;
        x = input.nextInt();
    }
}

Now, with Python:

x = input()

 

You can see how easy it is with Python; no file importing, no curly braces, no semicolons, and with just a single line. This has shown you how Python can be a programmer's relief.

In addition, you will notice from the examples above; with the C++ and Java code, the user can only type any integer as the input to variable x, this is because value x has been declared as an integer by specifying the code “int x;”. while, with Python, the programmer doesn't have to explicitly specify the data type while declaring a variable, as the Python compiler will do that based on the type of value assigned to the variable.

 

Few things about the course 

Currently, there are two releases of Python on its official website and they are Python 2.x and Python 3.x. However, this tutorial will be based on Python 3.x. But, the are no major changes between Python 3.x and Python 2.x. The addition or difference is just on the 'print'; in Python 2.x we just have print, while in Python 3.x we have the print(). That is the addition of the brackets.

 

Applications of Python 

One can say, you can do almost anything with Python.  

  • Web Application: It can be used to develop scalable and secured web applications. one can use frameworks such as Django, Flask, Pyramid, and so on to design and develop amazing web-based applications.
  • Computer Software or Desktop Applications: It can as well be used to develop GUI (graphics user interface), thereby making it a great choice for developing desktop applications. the TK is an open-source widget toolkit, developers can use it to develop desktop applications with python. One can also use the Kivy platform.
  • Scientific Computing Application: With Python’s amazing computational power and simple syntax, it is used for scientific computing applications. Libraries such as SciPy and NumPy in Python are best suited for scientific computations.
  • AI and ML ( that is Artificial Intelligence and Machine Learning): Recently, Python is at the forefront of the paradigm shift toward Artificial Intelligence and Machine Learning utilization.
  • Image Processing: It is also, known for its image processing capabilities including traversing and analyzing images pixel by pixel. Python has numerous image processing libraries such as the Pillow, scikit-image, and so on.

 

Installing Python 

Below are the steps to set up a Python environment on your PC.

Step 1: Go to python.org/download

Step 2: Download the latest release for Python 3.x for 32-bit or 64-bit depending upon your PC spec.

Step 3: Open Installer and follow the steps shown below:

Step 4: Once these steps had been followed, the installation will begin immediately.

Step 5: To check whether the installation was successful, type python -V in cmd. If it returns the Python version was installed, then congratulations you are ready to start.