Immediate download Problem Solving and Python Programming E. Balagurusamy ebooks 2024
Immediate download Problem Solving and Python Programming E. Balagurusamy ebooks 2024
com
https://ebookmass.com/product/problem-solving-and-python-
programming-e-balagurusamy/
OR CLICK HERE
DOWLOAD NOW
https://ebookmass.com/product/programming-for-problem-solving-e-
balagurusamy/
ebookmass.com
https://ebookmass.com/product/programming-and-problem-solving-with-
python-ashok-namdev-kamthane/
ebookmass.com
https://ebookmass.com/product/python-programming-using-problem-
solving-approach-1st-edition-reema-thareja/
ebookmass.com
https://ebookmass.com/product/breakheart-hill-thomas-h-cook/
ebookmass.com
Gender and HIV in South Africa 1st ed. Edition Courtenay
Sprague
https://ebookmass.com/product/gender-and-hiv-in-south-africa-1st-ed-
edition-courtenay-sprague/
ebookmass.com
https://ebookmass.com/product/advantages-and-pitfalls-of-pattern-
recognition-selected-cases-in-geophysics-volume-3-1st-edition-horst-
langer/
ebookmass.com
https://ebookmass.com/product/bioquimica-medica-5a-edicion-john-w-
baynes-marek-h-dominiczak/
ebookmass.com
https://ebookmass.com/product/a-black-winter-a-seasons-novel-office-
billionaire-romance-the-seasons-series-book-2-kate-smoak/
ebookmass.com
https://ebookmass.com/product/etextbook-pdf-for-americas-history-
concise-edition-volume-1-9th-edition/
ebookmass.com
Figuring Racism in Medieval Christianity M. Lindsay Kaplan
https://ebookmass.com/product/figuring-racism-in-medieval-
christianity-m-lindsay-kaplan/
ebookmass.com
Problem Solving and
Python Programming
About the Author
E Balagurusamy is presently the Chairman of EBG Foundation, Coimbatore. In the past he has also held the
positions of member, Union Public Service Commission, New Delhi and Vice-Chancellor, Anna University,
Chennai, Tamil Nadu. He is a teacher, trainer and consultant in the fields of Information Technology and
Management. He holds an ME (Hons) in Electrical Engineering and PhD in Systems Engineering from the
Indian Institute of Technology, Roorkee, Uttarakhand. His areas of interest include Object-Oriented Software
Engineering, E-Governance: Technology Management, Business Process Re-engineering and Total Quality
Management.
A prolific writer, he has authored a large number of research papers and several books. His best-selling
books, among others include:
● Programming in ANSIC, 7/e
● Fundamentals of Computers
● Numerical Methods
● Reliability Engineering
E Balagurusamy
Chairman
EBG Foundation
Coimbatore
Copyright © 2018 by McGraw Hill Education (India) Private Limited. No part of this publication may be reproduced or distributed in
any form or by any means, electronic, mechanical, photocopying, recording, or otherwise or stored in a database or retrieval system
without the prior written permission of the publishers. The program listings (if any) may be entered, stored and executed in a computer
system, but they may not be reproduced for publication.
1 23456789 D101417 22 21 20 19 18
Printed and bound in India
Print Edition:
ISBN-13: 978-93-87067-01-1
ISBN-10: 93-87067-01-7
Information contained in this work has been obtained by McGraw Hill Education (India), from sources believed to be reliable. However,
neither McGraw Hill Education (India) nor its authors guarantee the accuracy or completeness of any information published herein,
and neither McGraw Hill Education (India) nor its authors shall be responsible for any errors, omissions, or damages arising out
of use of this information. This work is published with the understanding that McGraw Hill Education (India) and its authors are
supplying information but are not attempting to render engineering or other professional services. If such services are required, the
assistance of an appropriate professional should be sought.
Typeset at The Composers, 260, C.A. Apt., Paschim Vihar, New Delhi 110 063 and printed at
Cover Printer:
Preface ix
Unit 3: Functions
Developments in the field of digital electronics and the huge amount of data generated during the last
few decades ushered in the second Industrial Revolution which is popularly referred to as the Information
Revolution. Information technology played an ever-increasing role in this new revolution. A sound knowledge
of how computers work, process and analyze data has, therefore, become indispensable for everyone who
seeks employment not only in the area of IT, but also in any other fields. Rightly so, many institutions and
universities in India have introduced a subject covering Problem Solving and Python Programming for their
undergraduate students. This book caters to those needs of the undergraduate students.
Publisher’s Note
Remember to write to us. We look forward to receiving your feedback, comments, and ideas to enhance
the quality of this book. You can reach us at info.india@mheducation.com. Please mention the title and
authors’ name as the subject. In case you spot piracy of this book, please do let us know.
Unit 1
Introduction to Computing and
Algorithmic Problem Solving
1.1 IntroductIon
In earlier days, the term “digital computer” was used to refer a person who drew mathematical tables and
solved complex calculations. In less than a human lifetime, computers have changed from massive, expensive
and unreliable calculators to the dependable and versatile machines that are now omnipresent in society.
Computers were once the size of rooms and used to take a day to change the program and now, it is just a
double click away. Computers help the impossible become possible. They have become a necessary tool in
today’s society. Without computers, it is hard to do pretty much anything. Computers process information in
1’s and 0’s (usually referred to as On and Off respectively). This operation identifies instructions in Binary
Code. This is the language understood by the computer to complete a command. By 1953, it was estimated
that there were almost 100 computers in the world.
It is believed that the first computer was invented in Berlin, Germany, in 1936.
● The Z1 was invented in 1936 by Konrad Zuse in Germany. This was a programmable machine that
1944. It was a large calculator. This computer was able to calculate many different types of numbers.
● With the advancement of technology and research, major companies like IBM, Apple, and Intel have
contributed to the explosion of the personal computers as we know today. For example, Apple 1 was
released in 1976 which was having memory of 4 KB expandable to 8 KB. The Macintosh was released
in 1984 which was having memory of 64 KB expandable to 256 KB.
● CSIRAC was the first computer to play digital music in 1949.
● UNIVAC 1 was used by CBS to predict the results of the 1952 presidential elections in USA.
● COBOL (Common Business Oriented Language), one of the oldest programming languages, was
● Single - board computer known as apple -1 was designed by Steve Wozniak some more important
developments and was marketed by his friend Steve Jobs.
● In 1980 IBM introduced its Personal Computers (PC). The first IBM PC was known as IBM Model
window's NT
● In 1994 Sony entred the home gaming market with release of play station console.
A Personal Computer (PC) is a digital computer designed for the usage by one person at a time. PCs
can be classified into desktop computers, workstations and laptop computers. Today, PCs have five major
applications which are as follows:
1. Internet Browser: Internet browser is a software application used to access the Internet. For example,
Internet Explorer, Firefox, Opera, etc., are all Internet browsers.
2. Data Compression Software: Data compression software is used to reduce file size. ZIP is widely used
as the data compression software on personal computers.
3. Windows Media Player: Windows Media Player is used to create music libraries for listening music.
4. Image Editing Software: Image editing software is used to develop good quality pictures. Examples of
such software include Photoshop, Microsoft Publisher and Picasa.
5. Audio Editing Software: Audio editing software is used to edit audio files and also to add audio effects.
Note The first personal computer was Altair 8800. Later IBM introduced IBM PC.
Computers have become an integral part of the society because of the following characteristics they
possess:
● A computer can perform millions of calculations in a second.
● A computer can store billions of bytes of information. For example, the capacity of a terabyte =
2,00,000 songs.
● A computer can work continuously without getting tired.
execution. The information can be stored by using compact disk (CD), floppy, etc.
2. Data or programs are stored into the main memory.
3. Processing of instructions is sequential.
Note A process describes how the processor takes the data or program, decodes it and
finally executes it. The fetch-decode-execute cycle is also known as the Von Neumann
execution cycle.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookmass.com