logo codesdope

Introduction


Python is a widely used high-level dynamic programming language. It is a very simple, friendly and easy to learn programming language. It is the best choice for a beginner programmer. Python source code is also available under the GNU General Public License (GPL).

Who use Python?


As mentioned above, it is a widely used programming language. Some of the places where Python is used are :

  • Google - Python is one of the key language used in google.
  • Philips - Philips uses Python for the sequencing language ( language that tells what steps each robot should take ).
  • Frequentis - Frequentis is the originator of TAPTools, a software product that is used for air traffic control in many airports. This particular tool provides updates on the weather and runway conditions to air traffic controllers. So, you depend on Python when you fly.
  • Quora - Quora also chose Python for its development
  • CodesDope - Yes, we also use Python.
  • Battlefield 2 - Battlefield 2 uses Python to implement core elements of its gameplay such as score-keeping and team-balancing.
  • Instagram - Instagram also uses Python for its backend
  • Walt Disney Feature Animation - Walt Disney Feature Animation is also using Python to make their animation production system more efficient in scripting.
  • NASA - Johnson Space center uses Python in its Integrated Planning System as the standard scripting language.
  • Civilization 4 - The new addition to the legendary strategy game series has all of its inner logic, including AI, implemented in Python.
  • YouTube - We all love youtube and and youtube loves using Python
  • DropBox - Dropbox allows us to store, sync, and share almost anything using the power of Python.
  • Pinterest - Pinterest is a visual discovery tool that allows users to showcase their interests through the posting of pictures.

This list is never-ending, with new additions to it every day, but I hope it is enough to motivate you to learn Python.

How is Python simple?


I will write a code to print Hello World on screen in C, Java and Python. Decide yourself which is simpler.

C

#include <stdio.h>
main()
{
printf("Hello World");
}

Java

class hello
{
public static void main(String []args)
{
System.out.println("Hello World");
}
}

Python

print "Hello World"

How to run Python


In Windows


1. Download python 2.

download python for windows

2. Install it.

3. Open IDLE(PythonGUI).

python shell in windows

To run directly on shell


4. Type the code given below and press Enter and then you can see Hello World printed on the screen.

print "Hello World"
run python codes in python shell in windows

To run from a file


4. Go to File -> New File

saving python codes in windows

5. Type the Python code given below and save it.

print "Hello World"

6. Go to Run -> Run Module and you will see Hello World printed.

run python codes from file in windows
run python codes from file in windows

Now, you know how to write and run Python codes and you are ready to go for the next chapter.

In Linux


1. Open terminal ( ctrl+alt+T ).

To run from a file


2. Open a new file with .py extension ( name of our file is hello.py ) in your favourite text editor ( we are using gedit ).

gedit hello.py

open file with .py in gedit

3. Write the Python code given below and save it.

print "Hello World"

4. To run this code, enter python hello.py (it means that you have to enter 'python filename').

run python code in terminal

Now, you can see Hello World printed on the screen.

So, now you know to write and run Python codes from file.

To run on python shell


2. Enter python terminal, then it will activate the python shell

open python shell in terminal

3. Enter the code given below and you will see Hello World printed.

print "Hello World"
run codes in python shell in terminal

Now, you are ready to go for the next chapter.

Share what you know
Doubt? Ask question
Close

Welcome.please sign up.

Close

Welcome.please login.