0% found this document useful (0 votes)
3 views3 pages

7496 Python Programming Introduction 07082025

Python is a high-level, interpreted, object-oriented programming language created by Guido van Rossum, known for its readability and versatility in developing applications. It supports various programming paradigms, including functional and structured programming, and is suitable for beginners. Python can be installed on multiple operating systems and offers an interactive mode for testing and debugging code.
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)
3 views3 pages

7496 Python Programming Introduction 07082025

Python is a high-level, interpreted, object-oriented programming language created by Guido van Rossum, known for its readability and versatility in developing applications. It supports various programming paradigms, including functional and structured programming, and is suitable for beginners. Python can be installed on multiple operating systems and offers an interactive mode for testing and debugging code.
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

Python Programming

Introduction of Python
Python is a general-purpose interpreted, interactive, object-oriented, and high-level
programming language. It was created by Guido van Rossum during 1985- 1990. Python
source code is also available under the GNU General Public License (GPL).
Python is a popular programming language.
Python can be used on a server to create web applications.
Python is a high-level, interpreted, interactive and object-oriented scripting
language. Python is designed to be highly readable.
Getting introduction with Python
Python is an open source, high-level programming language developed by Guido van Rossum in
the late 1980s and presently administered by Python Software Foundation.
Python is a powerful language that you can use to create games, write GUIs, and develop
web applications.
It is a high-level language. Reading and writing codes in Python is much like reading and
writing regular English statements.
Python is an interpreted language. This means that every time a program is run, its
interpreter runs through the code and translates it into machine-readable byte code.
Python is an object-oriented language that allows users to manage and control data
structures or objects to create and run programs. Everything in Python is, in fact, first class. All
objects, data types, functions, methods, and classes take equal position in Python.
Programming languages are created to satisfy the needs of programmers and users for an
effective tool to develop applications that impact lives, lifestyles, economy, and society. They
help make lives better by increasing productivity, enhancing communication, and improving
efficiency.
Advantages of learning Python
➢ Python is Interpreted − Python is processed at runtime by the interpreter. You
do not need to compile your program before executing it. This is like PERL and
PHP.
➢ Python is Interactive – We can interact at a Python prompt and interact with the
interpreter directly to write our programs.
➢ Python is Object-Oriented − Python supports Object-Oriented style or technique
of programming that encapsulates code within objects.
➢ Python is a Beginner's Language − Python is a great language for the beginner-
level programmers and supports the development of a wide range of applications
from simple text processing to WWW browsers to games.
Characteristics of Python
➢ It supports functional and structured programming methods as well as OOP.
➢ It can be used as a scripting language or can be compiled to bytecode for building
large applications.
➢ It provides very high-level dynamic data types and supports dynamic type
checking.
➢ It supports automatic garbage collection.
➢ It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
Structure of a python program
Python programs are structured through indentation. In Python, blocks of codes are
defined by indentation not as a matter of style or preference but as a rigid language
requirement. This principle makes Python codes more readable and understandable.
A block of code can be easily identified when you look at a Python program as
they start on the same distance to the right.
Python program structure.
1. How does a program connect to other programs?
2. How do we read a program and recognize its structure?
3. A key answer to question 2 is that well-written complex programs are broken up into
functions. We learn a bit more about how to read, write, and understand functions.
4. We learn about classes. We have been using Python classes all along without making
much of it. We learn about how a user can define classes, and a bit about when one
would want to.
5. We take our first big step toward programs that interact with the outside world, a
necessary property of data collection programs as we look at files and file
input/output.
Python's features
➢ Easy-to-learn − Python has few keywords, simple structure, and a clearly
defined syntax. This allows a student to pick up the language quickly.
➢ Easy-to-read − Python code is more clearly defined and visible to the eyes.
➢ Easy-to-maintain − Python's source code is fairly easy-to-maintain.
➢ A broad standard library − Python's bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.
➢ Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.
➢ Portable − Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.
➢ Extendable − You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.
➢ Databases − Python provides interfaces to all major commercial databases.
➢ GUI Programming − Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as Windows
MFC, Macintosh, and the X Window system of Unix.
➢ Scalable − Python provides a better structure and support for large programs
than shell scripting.

Python Environment
Python 3 is available for Windows, Mac OS and most of the flavors of Linux operating
system. Open a terminal window and type "python" to find out if it is already installed
and which version is installed.
Note − In order to install Python 3.5.1, minimum OS requirements are Windows 7
with SP1. For versions 3.0 to 3.4.x Windows XP is acceptable.
Installing Python in Windows
To install Python, you must first download the installation package of your
preferred version from this link:

[Link]

On this page, you will be asked to choose between the two latest versions for Python
2 and 3: Python 3.5.1 and Python 2.7.11.
You would normally opt to download the latest version, which is Python
3.5.1.

Running the Installation file:


Once you’re finished with the download, you can proceed to installation by clicking
on the downloaded .exe file. Standard installation will include IDLE, pip, and
documentation.
Interacting with Python
We can use it interactively when you simply want to test a code or a statement on
a line-by-line basis or when you’re exploring its features.
To use Python interactively, you can use either the Command Line window
or the IDLE Development Environment.
Command Line Interaction
The command line is the most straightforward way to work with Python. You can
easily visualize how Python works as it responds to every completed command
entered on the >>> prompt.

You might also like