Introduction to Computation and Programming Using Python with Application to Understanding Data 2nd edition Edition Guttag instant download
Introduction to Computation and Programming Using Python with Application to Understanding Data 2nd edition Edition Guttag instant download
https://ebookfinal.com/download/introduction-to-computation-and-
programming-using-python-with-application-to-understanding-
data-2nd-edition-edition-guttag/
https://ebookfinal.com/download/practical-programming-an-introduction-
to-computer-science-using-python-3-second-edition-paul-gries/
https://ebookfinal.com/download/introduction-to-scientific-
programming-and-simulation-using-r-2nd-edition-owen-jones/
https://ebookfinal.com/download/programming-python-with-cd-2nd-
edition-mark-lutz/
https://ebookfinal.com/download/head-first-programming-a-learner-s-
guide-to-programming-using-the-python-language-1st-edition-david-
griffiths/
Programming Elastic MapReduce Using AWS Services to Build
an End to End Application 1st Edition Schmidt
https://ebookfinal.com/download/programming-elastic-mapreduce-using-
aws-services-to-build-an-end-to-end-application-1st-edition-schmidt/
https://ebookfinal.com/download/problem-solving-in-data-structures-
algorithms-using-python-programming-interview-guide-1st-edition-
hemant-jain/
https://ebookfinal.com/download/introduction-to-computation-and-
modeling-for-differential-equations-2nd-edition-lennart-edsberg/
https://ebookfinal.com/download/understanding-and-using-scientific-
evidence-how-to-critically-evaluate-data-1st-edition-richard-gott/
Introduction to Computation and Programming Using
Python with Application to Understanding Data 2nd
edition Edition Guttag Digital Instant Download
Author(s): Guttag, John V
ISBN(s): 9780262529624, 0262529629
Edition: 2nd edition
File Details: PDF, 8.51 MB
Year: 2016
Language: english
Introduction to
Computation and
Programming Using Python
with Application to Understanding Data
Introduction to
Computation and
Programming Using Python
with Application to Understanding Data
Second Edition
John V. Guttag
10 9 8 7 6 5 4 3 2 1
To my family:
Olga
David
Andrea
Michael
Mark
Addie
CONTENTS
This book is based on courses that have been offered at MIT since 2006, and as
“Massive Online Open Courses” (MOOCs) through edX and MITx since 2012.
The first edition of the book was based on a single one-semester course. Howev-
er, over time I couldn’t resist adding more material than could be fit into a se-
mester. The current edition is suitable for a two-semester introductory computer
science sequence.
When I started working on the second edition I thought that I would just
add a few chapters, but I ended up doing far more. I reorganized the back half of
the book, and converted the entire book from Python 2 to Python 3.
The book is aimed at students with little or no prior programming experi-
ence who have a desire to understand computational approaches to problem
solving. For some of the students the material in this book will be a stepping
stone to more advanced computer science courses. But for many of the students
it will be their only formal exposure to computer science.
Because this will be the only formal exposure to computer science for many
of the students, we emphasize breadth rather than depth. The goal is to provide
students with a brief introduction to many topics, so that they will have an idea
of what’s possible when the time comes to think about how to use computation
to accomplish a goal. That said, this is not a “computation appreciation” book. It
is challenging and rigorous. Students who wish to really learn the material will
have to spend a lot of time and effort learning to bend the computer to their will.
The main goal of this book is to help students become skillful at making pro-
ductive use of computational techniques. They should learn to use computational
modes of thoughts to frame problems and to guide the process of extracting in-
formation from data. The primary knowledge they will take away from this book
is the art of computational problem solving.
This book is not easily slotted into a conventional computer science curricu-
lum. Chapters 1-11 contain the kind of material typically included in a computer
science course aimed at students with little or no programming experience.
Chapters 12-14 contain slightly more advanced material, various subsets of
which could be added to the introductory course if the students are more ad-
vanced. Chapters 15-24 are about using computation to help understand data.
xiv INTRODUCTION TO COMPUTATION AND PROGRAMMING USING PYTHON
They cover the material that we think should become the usual second course in
a computer science curriculum (replacing the traditional data structures course).
In Chapters 1-11, we braid together four strands of material:
• The basics of programming,
• The Python 3 programming language,
• Computational problem solving techniques,
• Computational complexity, and
• Using plots to present information.
We cover most of Python’s features, but the emphasis is on what one can do
with a programming language, not on the language itself. For example, by the
end of Chapter 3 the book has covered only a small fraction of Python, but it has
already introduced the notions of exhaustive enumeration, guess-and-check al-
gorithms, bisection search, and efficient approximation algorithms. We intro-
duce features of Python throughout the book. Similarly, we introduce aspects of
programming methods throughout the book. The idea is to help students learn
Python and how to be a good programmer in the context of using computation
to solve interesting problems.
The examples in this book have been tested using Python 3.5. Python 3
cleaned up many of the inconsistencies in the design of the various releases of
Python 2 (often referred to as Python 2.x). However, it is not backward compati-
ble. That meant that most programs written using Python 2 cannot be run using
implementations of Python 3. For that reason, Python 2.x continues to be widely
used. The first time we use features of Python 3 that differ from Python 2, we
point out how the same thing could be accomplished in Python 2. All of the ex-
amples in this book are available online in both Python 3.5 and Python 2.7.
Chapters 12-13 provide an introduction to optimization, an important topic
not usually covered in introductory courses. Chapters 14-16 provide an introduc-
tion to stochastic programs, another important topic not usually covered in in-
troductory courses. Our experience at MIT is that we can can cover either
Chapters 12-13 or Chapters 15-16, but not both, in our one-semester introducto-
ry course.
Chapters 15-24 are designed to provide a self-contained introduction to us-
ing computation to help understand data. They assume no knowledge of mathe-
matics beyond high school algebra, but do assume that the reader is comfortable
with rigorous thinking and is not intimidated by mathematical concepts. This
part of the book is devoted to topics not found in most introductory texts: data
visualization, simulation models, probabilistic and statistical thinking, and ma-
chine learning. We believe that this is a far more relevant body of material for
PREFACE xv
most students than what is typically covered in the second computer science
course.
We chose not to include problems at the end of chapters. Instead we inserted
“finger exercises” at opportune points within the chapters. Some are quite short,
and are intended to allow readers to confirm that they understood the material
they just read. Some are a bit more challenging, and are suitable for exam ques-
tions. And others are challenging enough to be useful as homework assignments.
The book has three pervasive themes: systematic problem solving, the power
of abstraction, and computation as a way of thinking about the world. When you
have finished this book you should have:
• Learned a language, Python, for expressing computations,
• Learned a systematic approach to organizing, writing, and debugging medi-
um-sized programs,
• Developed an informal understanding of computational complexity,
• Developed some insight into the process of moving from an ambiguous prob-
lem statement to a computational formulation of a method for solving the
problem,
• Learned a useful set of algorithmic and problem reduction techniques,
• Learned how to use randomness and simulations to shed light on problems
that don’t easily succumb to closed-form solutions, and
• Learned how to use computational tools (including simple statistical, visuali-
zation, and machine learning tools) to model and understand data.
Programming is an intrinsically difficult activity. Just as “there is no royal
road to geometry,”1 there is no royal road to programming. If you really want to
learn the material, reading the book will not be enough. At the very least you
should try running some of the code in the book. Various versions of the courses
from which this book has been derived have been available on MIT’s Open-
CourseWare (OCW) Web site since 2008. The site includes video recordings of
lectures and a complete set of problem sets and exams. Since the fall of 2012, edX
and MITx have offered online courses that cover much of the material in this
book. We strongly recommend that you do the problem sets associated with one
of the OCW or edX offerings.
1 This was Euclid’s purported response, circa 300 BCE, to King Ptolemy’s request for an easier way
to learn mathematics.
ACKNOWLEDGMENTS
The first edition of this book grew out of a set of lecture notes that I prepared
while teaching an undergraduate course at MIT. The course, and therefore this
book, benefited from suggestions from faculty colleagues (especially Ana Bell,
Eric Grimson, Srinivas Devadas, Fredo Durand, Ron Rivest, and Chris Terman),
teaching assistants, and the students who took the course. David Guttag over-
came his aversion to computer science, and proofread multiple chapters.
Like all successful professors, I owe a great deal to my graduate students. The
photo on the back cover of this book depicts me supporting some of my current
students. In the lab, however, it is they who support me. In addition to doing
great research (and letting me take some of the credit for it), Guha Balakrishnan,
David Blalock, Joel Brooks, Ganeshapillai Gartheeban, Jen Gong, Yun Liu, Ani-
ma Singh, Jenna Wiens, and Amy Zhao all provided useful comments on various
versions of this manuscript.
I owe a special debt of gratitude to Julie Sussman, P.P.A. Until I started work-
ing with Julie, I had no idea how much difference an editor could make. I had
worked with capable copy editors on previous books, and thought that was what
I needed for this book. I was wrong. I needed a collaborator who could read the
book with the eyes of a student, and tell me what needed to be done, what should
be done, and what could be done if I had the time and energy to do it. Julie bur-
ied me in “suggestions” that were too good to ignore. Her combined command of
both the English language and programming is quite remarkable.
Finally, thanks to my wife, Olga, for pushing me to finish and for excusing
me from various household duties so that I could work on the book.
1 GETTING STARTED
A computer does two things, and two things only: it performs calculations and it
remembers the results of those calculations. But it does those two things ex-
tremely well. The typical computer that sits on a desk or in a briefcase performs a
billion or so calculations a second. It’s hard to image how truly fast that is. Think
about holding a ball a meter above the floor, and letting it go. By the time it
reaches the floor, your computer could have executed over a billion instructions.
As for memory, a small computer might have hundreds of gigabytes of storage.
How big is that? If a byte (the number of bits, typically eight, required to repre-
sent one character) weighed one gram (which it doesn’t), 100 gigabytes would
weigh 10,000 metric tons. For comparison, that’s roughly the combined weight of
15,000 African elephants.
For most of human history, computation was limited by the speed of calcula-
tion of the human brain and the ability to record computational results with the
human hand. This meant that only the smallest problems could be attacked
computationally. Even with the speed of modern computers, there are still prob-
lems that are beyond modern computational models (e.g., understanding climate
change), but more and more problems are proving amenable to computational
solution. It is our hope that by the time you finish this book, you will feel com-
fortable bringing computational thinking to bear on solving many of the prob-
lems you encounter during your studies, work, and even everyday life.
What do we mean by computational thinking?
All knowledge can be thought of as either declarative or imperative. Declara-
tive knowledge is composed of statements of fact. For example, “the square root
of x is a number y such that y*y = x.” This is a statement of fact. Unfortunately, it
doesn’t tell us anything about how to find a square root.
Imperative knowledge is “how to” knowledge, or recipes for deducing infor-
mation. Heron of Alexandria was the first to document a way to compute the
square root of a number.2 His method for finding the square root of a number,
call it x, can be summarized as:
2 Many believe that Heron was not the inventor of this method, and indeed there is some evidence
that it was well known to the ancient Babylonians.
Discovering Diverse Content Through
Random Scribd Documents
8. Jacques-Bonnet-Gigault de Bellefonds (d. 1746). Buried in
Notre Dame.
9. Christophe de Beaumont du Repaire (d. 1781). Buried in
Notre Dame.
10. Antoine-Eléonore-Léon Le Clerc de Juigné de Neuchelle
(d. 1811). Buried in Notre Dame.
11. Jean-Baptiste de Belloy. Cardinal. Died, aged ninety-eight
years and eight months, in 1808, and buried in Notre Dame.
12. Alexandre-Angélique de Tallyrand-Perigord. Born 1736.
Archbishop of Reims 1776. Cardinal 1817; Died 1821.
13. Hyacinthe-Louis de Quélen. Born 1778. Bishop of
Samosate 1817; Archbishop of Paris 1821. Died 1839.
14. Denis III., Auguste Affre. Born 1793. Archbishop of Paris
1840. Struck by a ball at the barricades in the Faubourg Saint-
Antoine on June 25th, 1848, and died two days later.
15. Marie-Dominique-Auguste Sibour. Born 1792. Bishop of
Digue 1839; Archbishop of Paris 1848. Was assassinated on Jan.
3rd, 1857, in the church of Saint-Etienne du Mont by a priest.
He had as auxiliary bishop Léon-François Sibour.
16. François III., Nicolas-Madeleine Morlot. Born 1795. Bishop
of Orléans 1839; Archbishop of Tours 1842; Cardinal 1853;
Archbishop of Paris 1857. Died 1862.
17. Georges Darboy. Born 1813. Bishop of Nancy 1850;
Archbishop of Paris 1863. Arrested as a hostage by the
Commune on April 4th, 1871, and shot on May 27th.
18. Joseph-Hippolyte Guibert. Born 1802. Archbishop of Tours
1857; Archbishop of Paris 1871; Cardinal 1873. Died 1886.
19. François-Marie-Benjamin Richard. Born 1819. Bishop of
Belley 1871; Coadjutor of Archbishop Guibert 1875; Archbishop
of Paris 1886. Cardinal 1889.
INDEX
Bells, 42
Bishops, list of, 98–100
Bishop’s Palace, 94, 98
Buttress system, 44
Chapels added, 8
Chapels
of the choir, 90–93;
of the nave, 66–69
“Chimères,” 40
Choir, 82; in the thirteenth century, 81
Clerestory: nave, 64;
transepts, 72
Cloister, or Cloître, 8, 95
Crypt, 86
Darboy, Archbishop, statue of, 91
Decoration, coloured mural, 66–68, 75
“Devils of Notre Dame,” 20
Dimensions of the cathedral, 56
Doorways: west, 30–38;
transepts, 48–53
Flèche, 42
Organ, 64
Relics, 95, 96
Revolution, the, 12
Roman remains, 5, 86
Roof, 42, 57
Rose windows of transepts, 75
Sacristy, 95
St. Denis, 5; statue of, 75;
chapel of, 90
St. Marcel, statue of, 33, 38;
shrine of, 76, 81;
chapel of, 92
Sanctuary, 81, 86
Screen, sculptured, in choir, 77
Stalls, choir, 85
“Stryge, le,” 41
Vaulting, 57, 62
PARIS
A. Chapelle Saint-Martin.
B. Chapelle Saint-Ferdinand.
C. Chapelle Saint-Germain.
D. Chapelle Saint-Louis.
E. Chapelle Saint-Marcel.
F. Chapelle de N. D. des Sept Douleurs, or du Petit Chœur.
G. Chapelle Saint-Georges.
H. Chapelle Saint-Guillaume.
I. Chapelle Sainte-Madelaine.
J. Chapelle Saint-Denis.
A.K.MoRGAN. del:
H. N. King, photo.
WESTMINSTER. WALL ARCADE AND FRESCOES IN THE
CHAPTER-HOUSE
“It has been compiled with great care from the best
authorities, and is especially full on the monuments.
Visitors could not have a better guide to the most
famous of English minsters.”—London Quarterly
Review.
Page 4
that our own proud Minster
than our own proud Minster
Page 7
Description de Notre-Dame, Cathédral de
Paris changed to
Description de Notre-Dame, Cathédrale de
Paris
Page 10
se mit A genoux et fit changed to
se mit à genoux et fit
Page 13
music by Gossee changed to
music by Gossec
Page 14
parfaite à la moinde des actions changed to
parfaite à la moindre des actions
Page 15
apres avoir reçu changed to
après avoir reçu
Page 15
douce et legère changed to
douce et légère
Page 19
mere decorative idiosyncracy changed to
mere decorative idiosyncrasy
Page 20
Ths choir was begun changed to
The choir was begun
Page 40
Chimères or “Devils of Notre Dame.”
changed to
Chimères or “Devils of Notre Dame.”
Page 40
was in its decadance changed to
was in its decadence
Page 41
ONE OF THE CHIMAERAS OF NOTRE DAME
changed to
ONE OF THE CHIMÈRAS OF NOTRE DAME
Page 42
which was irrevently compared changed to
which was irreverently compared
Page 52
TYMPANIUM OF THE NORTH TRANSEPT
DOORWAY changed to
TYMPANUM OF THE NORTH TRANSEPT
DOORWAY
Page 53
Near the Port Rouge changed to
Near the Porte Rouge
Page 65
in the cathedrall church changed to
in the cathedral church
Page 67
Il en résultei nstinctivement pour changed
to
Il en résulte instinctivement pour
Page 78
Notre Dame par Vespace XXV changed to
Notre Dame par l’espace XXV
Page 89
by Antoine Coyevox changed to
by Antoine Coysevox
Page 90
Archbishop Sibor, who was murdered
changed to
Archbishop Sibour, who was murdered
Page 92
Archbishop Leclercq de Juigné changed to
Archbishop Leclerc de Juigné
Page 95
The Cloîture or Cloister of Notre Dame
was on
The Cloître or Cloister of Notre Dame was
on
Page 96
church of St. Germain des Près changed to
church of St. Germain des Prés
Page 96
dull houses of the Rue du Cloîture Notre-
Dame changed to
dull houses of the Rue du Cloître Notre-
Dame
Page 99
Barthélemy (1223–1227) changed to
Barthélémy (1223–1227)
Page 105
Cloister, or Cloiture changed to
Cloister, or Cloître
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
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.
ebookfinal.com