Welcome! This is your first step towards learning Python programming language. Or, Do you know this language already and are here just to revise your concepts?. It doesn't matter which category you belong to because we will be teaching you Python, right from the basics.
An experienced programmer might have an advantage of picking up topics and lessons rather quickly, even though we recommend you to not to hurry through the topics, since Python, although being a normal programming language, carries some nice treats for programmers, and you would not want to miss those in the tutorials.
For all the noobs out there, there is nothing to worry. You should be happy that you have chosen the most amazing and simple tutorial to learn Python.
Python is considered as one of the most versatile programming languages. If you have even a little experience in programming, then you will soon notice the difference. Let's take a look at the features of Python.
As far as its simplicity of syntax is concerned, let's see an example code. Consider a program where you want the user to enter something from the keyboard and you want to save that value in a variable. For C++, a popular programming language, here is how you will be writing it:
#include<iostream>
using namespace std;
int main(){
int x;
cin >> x;
return 0;
}
For Core Java, another popular programming language, it will be:
import java.util.Scanner;
class Test{
Scanner input = new Scanner(System.in);
public static void main(String args[]){
int x;
x = input.nextInt();
}
}
And in Python
, it is (*drum roll*):
x = input()
No kidding. That's all it will take. No file importing, no curly braces, no semicolons and just one line. It's really not necessary to understand that code piece right now. It was just meant to demonstrate you that how Python can be a programmer's relief.
Another thing that can be noticed in above code is, in the case of C++ and Java user can only type any integer
as the input to variable x
, because we have declared value x
as an integer by specifying the code: int x;
. In case of Python, programmers don't have to explicitly specify the data type while declaring a variable, python's compiler will do that itself, based on the type of value assigned to the variable.
To be precise there are currently two releases of Python that are available on their official website i.e., Python 2.x and Python 3.x. In this course we will be dealing with Python 3.x
Also, there is not too much difference between Python 3.x and Python 2.x, the major change is in the way how you print anything. It was just print
in Python 2.x and in Python 3.x they made it print()
, yes added the brackets.
One can say, you can do almost anything with Python.
Tk
is an open source widget toolkit which can be used to develop desktop applications with python. Kivy
is another such platform.
SciPy
and NumPy
are best suited for scientific computations.
Starting with something that you might already be using: Websites like Instagram, Reddit, Mozilla, have been developed using Python. There are various web frameworks like Django
(most popular one) and Pyramid
, based on Python, which can be used to develop modern web applications.
Steps to set up Python environment in your Windows system:
Click on Next, once you have checked the selected options in the window.
python -V
in cmd. If it returns the Python version that you have installed, then congratulations you're all set.
If you have a Macbook, the MacOS comes pre-loaded with Python 2.7.x but you cannot update the version or add module in pythona>, as its required by the operating system. So you should download Python 3 and setup virtual environment in Macbook.
If you use Ubuntu operating system, it comes pre-loaded with Python.