CBSE CS

cbse cs logo

Home

Overview of Python Programming Language

Introduction to Python

Python is a general-purpose Object Oriented Programming language, High-level language Developed in late 1980 by Guido van Rossum at National Research Institute for Mathematics and Computer Science in the Netherlands. It is an Open Source Scripting language and is Case-sensitive language .

Features of Python

• Python is a high level language. It is a free and open source language.
• It is an interpreted language, as Python programs are executed by an interpreter.
• Python programs are easy to understand as they have a clearly defined syntax and relatively simple structure.
• Python is case-sensitive. For example, NUMBER and number are not same in Python.
• Python is portable and platform independent, means it can run on various operating systems and hardware platforms.
• Python has a rich library of predefined functions.
• Python is also helpful in web development. Many popular web services and applications are built using Python.
• Python uses indentation for blocks and nested blocks

Timeline/History

  • Python was developed in the late 1980s.
  • Python was created by Guido Van Rossum when he was working at CWI (Centrum Wiskunde & Informatica) which is a National Research Institute for Mathematics and Computer Science in Netherlands.
  • The language was released in I991. Python got its name from a BBC comedy series from seventies- “Monty Python”s Flying Circus”.
  • In 1991 python 0.9.0 was published and reached the masses through alt.sources
  • In January of 1994 python 1.0 was released

The language is used by these companies:

  • In operations of Google search engine, youtube, etc.
  • Bit Torrent peer to peer file sharing is written using Python
  • Intel, Cisco, HP, IBM, etc use Python for hardware testing.
  • Maya provides a Python scripting API
  • i–Robot uses Python to develop commercial Robot.
  • NASA and others use Python for their scientific programming task.

Python IDLE

 
  • To write and run Python program, we need to have Python interpreter installed in our computer.
  • IDLE (GUI integrated) is the standard, most popular Python development environment.
  • To write and run Python program, we need to have Python interpreter installed in our computer.
  • IDLE (GUI integrated) is the standard, most popular Python development environment.

How to Run program

Python shell can be used in two ways

 

Interactive mode

Where Interactive Mode, as the name suggests, allows us to interact with OS

We type Python expression / statement / command after the prompt and Python immediately responds with the output of it.
Let”s start with typing print “How are you” after the prompt.

>>>print( “How are you?” )

How are you?

 

 

Script mode

In script mode, we type Python program in a file and then use the interpreter to execute the content from the file.

To create and run a Python script, we will use following steps in IDLE, if the script mode is not made available by default with IDLE
environment.

1. File>Open OR File>New Window (for creating a new script file)

2. Write the Python code as function i.e. script

3. Save it (^S)

4. Execute it in interactive mode- by using RUN option (^F5)

Otherwise (if script mode is available) start from Step 2

 

Interactive Mode

Python shell can be used in two ways

Interactive mode

Where Interactive Mode, as the name suggests, allows us to interact with OS

Script mode

Script mode let us create and edit python source file.

error: Content is protected !!