Programming in Python
eBook - ePub

Programming in Python

Learn the Powerful Object-Oriented Programming

Dr. Pooja Sharma

Condividi libro
  1. English
  2. ePUB (disponibile sull'app)
  3. Disponibile su iOS e Android
eBook - ePub

Programming in Python

Learn the Powerful Object-Oriented Programming

Dr. Pooja Sharma

Dettagli del libro
Anteprima del libro
Indice dei contenuti

Informazioni sul libro

An interactive way to introduce the world of Python Programming Key Features

  • Detailed comparisons and differentiation of python language from other most popular languages C/C++/Java.
  • Authentic and extensive set of programming illustrations in every chapter of the book.
  • Broad study on all the programming constructs of the python programming language such as native data types, looping, decision making, exception handling, file handling etc.
  • Broad study of Python Object Oriented Programming features with illustrations.
  • Numerous review questions and exercises at the end of every chapter.

  • Description
    This Book is meant for wide range of readers who wish to learn the basics of Python programming language. It can be helpful for students, programmers, researchers, and software developers. The basic concepts of python programming are dealt in detail. The various concepts of python language such as object-oriented features, operators, native data types, control structures, functions, exception handling, file handling, etc are discussed in detail with the authentic programming illustration of each.presently, python programming is a hot topic among academician's researchers, and program developers. As a result, the book is designed to give an in-depth knowledge of programming in python. This book can be used as handbook as well as a guide for students of all computer science stream at any grade beginning from 10+1 to Research in PhD. To conclude, we hope that the readers will find this book a helpful guide and valuable source of information about python programming. What You Will Learn
  • Python Data Types, Input Output
  • Operators and Expressions
  • Control Structures
  • Python Functions, Modules
  • Exception Handling
  • File Management, Classes and Objects
  • Inheritance, Python Operator Overloading

  • Who this book is for
    Students, Programmers, researchers, and software developers who wish to learn the basics of Python programming language. Table of Contents
    1. Introduction to Python Language
    2. Python Data Types and Input Output
    3. Operators and Expressions
    4. Control Structures
    5. Python Native Data Types
    6. Python Functions
    7. Python Modules
    8. Exception Handling
    9. File Management in Python
    10. Classes and Objects
    11. Inheritance
    12. Python Operator Overloading About the Author
    Dr. Pooja Sharma completed her bachelor's degree in computer applications in 2005 with 4th position in the University and master's degree in computer science in 2007 with Gold Medal for securing first position from Guru Nanak Dev University, Amritsar.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Programming in Python è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Programming in Python di Dr. Pooja Sharma in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in Python. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.




Introduction to Python Language


  • Introduction and history of Python language
  • Features of Python
  • Applications of Python
  • Python interactive help
  • Installing and executing Python
  • How Python differ from other languages
We see that computers are capable of solving numerous problems of the real world. The problems can be as simple as to multiply two numbers or as cumbersome as to design and launch a space shuttle. This would be incorrect to assume that the computer can do all the tasks on its own. Any problem whose solution is not identified cannot be solved by a computer. The computer merely works on the set of instructions given to it by a programmer. If the computer does not understand the instructions then errors may occur and solution cannot be obtained. Therefore, it is keen responsibility of the programmer to devise a solution by giving correct instructions to the computer.

1.1. Programming Language

In order to solve a problem using computer, the programmer writes the instructions which are understandable by the computer. The computer understands only digital data either ‘0’ or ‘1’. The most basic language is the machine language that uses binary ‘0’ and ‘1’., which a computer can understand and execute very fast without using any translator (compiler or interpreter). However, it is quite difficult to code a program in machine language. The high level languages such as (C, C++, Java) are very simple to understand by humans because these languages use English language like statements. However, an additional program such as a compiler or interpreter is required to convert the high level language into machine language. Therefore, high level languages are slower than machine languages.
In other words, we can say that people express themselves using a language that has many words. Computers use a simple language that consists of strings of 0s and 1s, with a 1 representing “on” and a 0 representing “off.”. The programming language works as a translator between you and the computer. Rather than learning the computer's native language (called as machine language), one can make use of a programming language to instruct the computer in a way that is easier to learn and understand.
Every programming language has a particular structure with a specific syntax and semantics. Programming language is something like a code for writing down the instructions that a computer will follow. In fact, programmers often refer to their programs as computer code, or the process of implementing an algorithm. Alike other high level languages such as C, C++, Java, Python is also a programming language. In this book, we will learn Python programming language in detail.

1.2. History of Python Language

Python is a very powerful high-level, object oriented programming language. It was developed by Guido Van Rossum during 1985-1990 at the national research institute for mathematics and computer science in Netherlands. It is the derivative of several other languages such as ABC, Modulo-3, C, C++, Algol-68, SmallTalk and Unix Shell. ABC is a general-purpose programming language or programming environment, which had been developed in Netherlands, Amsterdam, at the CWI (Centrum Wiskunde & Informatica). The greatest achievement of ABC was to influence the design of Python.
The source code of Python language is available under GNU i.e., General Public License (GPL). The Python is a very easy to use language with simple syntax, which makes it perfect language for beginners. It is an interpreter based language. Interpreter is a program that converts high level program into low level program, i.e., machine code. It is designed to be highly readable because it uses English keywords very frequently whereas other languages use punctuations. Moreover, it has fewer syntactical constructions than other languages.
Guido Van Rossum published the first version of Python code (version 0.9.0) in February 1991. This release included already exception handling, functions, and the core data types of list, dict, str and others. Python was developed to be module as well as object oriented language. Another version 1.0 of Python was released in January 1994. The major new features included in this release were the functional programming tools lambda, map, filter and reduce, which Guido Van Rossum never liked. Six and a half years later in October 2000, Python 2.0 was introduced. This release included list comprehensions, a full garbage collector and it had the support for Unicode. Python flourished for another 8 years in the versions 2.x before the next major release as Python 3.0 (also known as “Python 3000” and “Py3K”). Python 3 is not backwards compatible with Python 2.x. The emphasis in Python 3 had been on the removal of duplicate programming constructs and modules.

1.3. Origin of Python Programming Language

At the time when he began implementing Python, Guido van Rossum was reading the published scripts from “Monty Python's Flying Circus” (a BBC comedy series from the seventies). It occurred to him that he needed a name that should be short, unique, and slightly mysterious, so he decided to call the language Python.

1.4. Features of Python

The Python language exhibits numerous features, which are detailed as under:
Beginner 's Language: Python is a great language for beginner level programmers, which supports the development of a wide range of applications from simple text processing to web browsers to games.
Easy to Learn: Python has simple structure, a few keywords, and clearly defined syntax.
Easy to Read: It is clearly defined language that is a non-programmer understands it very easily.
Easy to Maintain: The source code of Python language is quite easy to maintain.
Interpreted: It is interpreter based language. The programmer does not need to compile the code before executing the program similar to PERL and PHP. Python has a built-in debugging feature.
Interactive: Python programs can be directly written to the Python prompt by which user directly interacts with the interpreter.
Object Oriented: It supports object oriented style of programming that encapsulates code within objects. OOP breaks up code into several units that pass messages back and forth using classes.
Versatile: Python modules are capable to work with multiple operating systems and user interfaces including images and sounds.
Broad Standard Library: Python language 's bulk library is portable and cross platform compatible with UNIX, Windows and Macintosh.
Interactive Mode: Python language has support for interactive mode, which allows interactive testing and debugging of code.
Portable: Python language can be executed on wide variety of hardware platforms and has similar interface on all the platforms.
Databases: Python language provides the facility of interfaces to all major commercial databases.
GUI Programming: Python provides graphical user interface (GUI) applications that can be created and ported to many system calls, libraries and Windows systems such as Windows MFC, MAC, and the X Window system of Unix.
Scalable: It provides a better structure and support for large programs.

1.5. Limitations of Python

As we see, Python language has many features, it has some limitations also as under:
  • Python is an interpreter based language. Therefore, it is bit slower than compiler based languages.
  • Since, Python is a high level language like C/C++/Java, it also uses many layers to communicate with the operating system and the computer hardware.
  • Graphics intensive applications such as games make the program to run slower.

1.6. Major Applications of Python

The list of companies that use Python include the following:
  • Yahoo! (for Yahoo! Maps)
  • Google (for its spider and search engine)
  • Linux Weekly News (published by using a web application written in Python)
  • Industrial Light & Magic (used in the production of special effects for movies such as The Phantom Menace and The Mummy Returns).

1.7. Getting Python

The most up-to-date and current source code, binaries, documentation, news, etc., is available on the official website of Python:
The complete Python documentation can be obtained from the following the site The documentation is available in HTML, PDF and PostScript formats.

1.8. Installing Python

Python distribution is available for a wide variety of platforms. You need to download only the binary code applicable for your platform and install Python.You need a C compiler to compile the source code manually, if the binary code for your platform is not available. The installation of Python at various platforms like Unix and Linux is given as follows


Indice dei contenuti