0% found this document useful (0 votes)
26 views4 pages

CHPT 6 LECT1 GSWP IP

This document provides an introduction to the Python programming language. It discusses that Python is an interpreted, high-level and dynamic programming language that is easy to use, cross-platform, and free/open source. It can be used for a variety of tasks including web development, scripting, data analysis, and more. The document also provides information on using Python's interactive shell and performing basic operations and calculations.

Uploaded by

White 444
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

CHPT 6 LECT1 GSWP IP

This document provides an introduction to the Python programming language. It discusses that Python is an interpreted, high-level and dynamic programming language that is easy to use, cross-platform, and free/open source. It can be used for a variety of tasks including web development, scripting, data analysis, and more. The document also provides information on using Python's interactive shell and performing basic operations and calculations.

Uploaded by

White 444
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Chapter 6: Getting Started with Python

Lecture -1
Introduction:
Python programming language was developed by Guido Van Rossum in February 1991. Python
is based on or influenced with two programming languages:
➢ ABC language, a teaching language created as a replacement of BASIC.
➢ Modula -3

Features of Python:
Python is an interactive, interpreted language with a simple syntax. It is becoming increasingly
popular owing to the following features:
i) Easy to Use (Easy):
Python is a loosely typed Object-Oriented programming language with few
keywords (reserved words), simple English-like structure and is easy to learn.
ii) Expressive Language:
Python is an expressive language –fewer lines of code and simpler syntax, for example,
consider following two sets of codes:

// in C++: swap values // In Python: swap values


int a =10, b= 7, temp; a, b =2, 3
temp=a; a, b = b, a
a=b;
b=temp;

iii) Interpreted language:


Python is an interpreted language, not a compiled language. It makes Python an
easy-to-debug language and thus suitable for beginners to advance users.

iv) Its Completeness:


For the most types of required functionality is available through various modules of
Python standard library.

v) Cross-platform Language:
Python can run equally well of variety of platforms – Windows, Lynux/UNIX,
Macintosh, supercomputers, smart phones etc. Python is a true cross-platform
language. Or in other words, Python is a platform independent or portable
language.

vi) Free and Open Source:


Python language is freely available along with its source-code.

vii) Variety of Usage/Applications:


Python has evolved into a powerful, complete and useful language over these years.
These days Python is being in many diverse fields/applications, some of which are:
➢ Scripting
➢ Web Applications
➢ Game Development
➢ Database Applications
➢ System Administrations
➢ Rapid Prototyping
➢ GUI programs

1
1. Interacting with Python (Python IDLE);
Python is a flexible, dynamic and powerful language that can be used in different ways. It can
be interactively used simply to test a code or a statement line by line or while exploring its
interface
Python is used by Google, YouTube, etc. It is being widely used for system programming, GUI
programming, Internet scripting/web, gaming, text processing, network programming,
commercial robots and in space and scientific interface.

To write and run Python programs interactively, we can either use the command line window
or IDLE (Integrated Development Learning Environment that comes with Python. The
most important feature of IDLE is that it is a program that allows the user to edit, run, browse
and debug a Python program from a single interface.

Python Shell:
When we first start Python IDLE by clicking on its icon creating on the desktop or menu item
on the 𝑺𝒕𝒂𝒓𝒕 𝒃𝒖𝒕𝒕𝒐𝒏 → 𝑨𝒍𝒍 𝑨𝒑𝒑𝒔 → 𝑰𝑫𝑳𝑬 (𝑷𝒚𝒕𝒉𝒐𝒏 𝟑. 𝟏𝟎) option, it always stars up the
Python Shell as:

On opening, Python Shell shows a welcome message displaying its version and a copyright
notice. After this, the command prompt (>>>) followed by a blinking cursor gets displayed,
which indicates that IDLE is now ready to take Python commands from the user.
Command Line Interaction:
When commands are entered directly in IDLE from the keyboard, the interpreter / IDLE is
said to be in interactive mode. In Interactive Mode we can type the command as follows:

2
Python is a case-sensitive languge. This means that Python differentiates between capital and
small alphabets. For example, print (P capital) and ( p small) are two differnt things for
Python.
e.g.,

We can perform mathematicals calculation using the Python command prompt.

Note: We can repeat a command in IDLE, by pressing Alt+p in order to save time and typing
effort.

3
Q1. What is Python?
Ans:
Python is a high-level, interpreted, dynamic, Object-Oriented Programming Language that support
GUI programming.

Q2. Why is Python interpreted?


Ans:
Python is interpreted because the program is process at runtime by the interpreter and we do not
need to compile our programming before executing it.
‘Python is an interpreted language’ means it requires an interpreter (not compiler) to execute its code
line by line – one statement at a time.

Q3. Who developed Python?


Ans:
Python was developed by Guido Van Rossum in 1991 at the National Research Institute for
Mathematics in the Netherlands.

Q4. What does a cross platform language mean?


Ans:
A cross platform language means it can run well on variety of platforms like windows, Linux/Unix,
Macintosh etc.

Q5. Python is a free and open source language. What do you understand
by this feature?
Ans:
It means-to download Python, one needs not pay anything because it is Free and its source-code is
also available, which can be modified/improved etc., because it is open-source.

You might also like