Fundamentals of Python: First Programs, 2nd Edition Kenneth A. Lambert 2024 Scribd Download
Fundamentals of Python: First Programs, 2nd Edition Kenneth A. Lambert 2024 Scribd Download
https://ebookmass.com
https://ebookmass.com/product/fundamentals-of-
python-first-programs-2nd-edition-kenneth-a-
lambert/
https://ebookmass.com/product/fundamentals-of-python-data-
structures-2nd-edition-kenneth-a-lambert/
testbankdeal.com
https://ebookmass.com/product/data-science-from-scratch-first-
principles-with-python-2nd-edition/
testbankdeal.com
https://ebookmass.com/product/fundamentals-of-structural-analysis-5th-
edition-kenneth-m-leet/
testbankdeal.com
https://ebookmass.com/product/python-fundamentals-for-finance-a-
survey-of-algorithmic-options-trading-with-python-van-der-post/
testbankdeal.com
C and Python Applications: Embedding Python Code in C
Programs, SQL Methods, and Python Sockets Philip Joyce
https://ebookmass.com/product/c-and-python-applications-embedding-
python-code-in-c-programs-sql-methods-and-python-sockets-philip-joyce/
testbankdeal.com
https://ebookmass.com/product/fundamentals-of-structural-analysis-
solution-manual-5th-edition-kenneth-m-leet/
testbankdeal.com
https://ebookmass.com/product/fundamentals-of-nursing-2nd-edition-
lauren-mctier/
testbankdeal.com
https://ebookmass.com/product/essentials-of-anatomy-physiology-2nd-
edition-kenneth-s-saladin/
testbankdeal.com
https://ebookmass.com/product/a-beginners-guide-to-
python-3-programming-2nd-edition-john-hunt/
testbankdeal.com
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
second Edition
Fundamentals of Python:
First Programs
Kenneth A. Lambert
Martin Osborne,
Contributing Author
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Fundamentals of Python: © 2019, 2012 Cengage
First Programs, Second Edition
ALL RIGHTS RESERVED. No part of this work covered by the copy-
Kenneth A. Lambert
right herein may be reproduced or distributed in any form or by
any means, except as permitted by U.S. copyright law, without the
SVP, GM Skills: Jonathan Lau prior written permission of the copyright owner.
Product Team Manager: Kristin Unless otherwise noted all tables/figures exhibits are © 2019 Cengage®
McNary
Cover image: Digital_Art/ Cengage products are represented in Canada by Nelson Education, Ltd.
Shutterstock.com To learn more about Cengage, visit www.cengage.com.
Production Service/Composition: Purchase any of our products at your local college store or at our
SPi Global preferred online store www.cengagebrain.com.
Publisher does not warrant or guarantee any of the products described herein or perform any independent analysis
in connection with any of the product information contained herein. Publisher does not assume, and expressly
disclaims, any obligation to obtain and include information other than that provided to it by the manufacturer. The
reader is expressly warned to consider and adopt all safety precautions that might be indicated by the activities
described herein and to avoid all potential hazards. By following the instructions contained herein, the reader willingly
assumes all risks in connection with such instructions. The publisher makes no representations or warranties of any
kind, including but not limited to, the warranties of fitness for particular purpose or merchantability, nor are any
such representations implied with respect to the material set forth herein, and the publisher takes no responsibility
with respect to such material. The publisher shall not be liable for any special, consequential, or exemplary damages
resulting, in whole or part, from the readers’ use of, or reliance upon, this material.
CHAPTER 1 I n t ro du ct io n����������������������������������������������� 1
Two Fundamental Ideas of Computer Science:
Algorithms and Information Processing ������������������������������ 2
Algorithms ������������������������������������������������������������������� 2
Information Processing��������������������������������������������������� 4
Exercises ������������������������������������������������������������������������ 5
The Structure of a Modern Computer System������������������������ 6
Computer Hardware ������������������������������������������������������� 6
Computer Software ������������������������������������������������������� 7
Exercises ������������������������������������������������������������������������ 9
A Not-So-Brief History of Computing Systems������������������������ 9
Before Electronic Digital Computers��������������������������������11
The First Electronic Digital Computers (1940–1950) ���������13
The First Programming Languages (1950–1965) ��������������14
Integrated Circuits, Interaction,
and Timesharing (1965–1975)��������������������������������������16
Personal Computing and Networks (1975–1990) ��������������17
Consultation, Communication,
and E-Commerce (1990–2000)��������������������������������������19
Mobile Applications and Ubiquitous
Computing (2000–present) ������������������������������������������21
Getting Started with Python Programming ���������������������������22
Running Code in the Interactive Shell ������������������������������22
Input, Processing, and Output�����������������������������������������24
Editing, Saving, and Running a Script ������������������������������27
Behind the Scenes: How Python Works�����������������������������28
Exercises �����������������������������������������������������������������������29
Detecting and Correcting Syntax Errors������������������������������29
Exercises �����������������������������������������������������������������������30
Suggestions for Further Reading ���������������������������������������30
Summary �����������������������������������������������������������������������31
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
contents
CHAPTER 2 S o f t w are D
evelo pment, Data Ty pes,
iv an d Expres s io n s��������������������������������������� 34
The Software Development Process �����������������������������������35
Exercises �����������������������������������������������������������������������37
Case Study: Income Tax Calculator ������������������������������������38
Strings, Assignment, and Comments�����������������������������������41
Data Types ������������������������������������������������������������������41
String Literals��������������������������������������������������������������42
Escape Sequences��������������������������������������������������������43
String Concatenation�����������������������������������������������������43
Variables and the Assignment Statement��������������������������44
Program Comments and Docstrings ��������������������������������45
Exercises �����������������������������������������������������������������������46
Numeric Data Types and Character Sets �����������������������������47
Integers�����������������������������������������������������������������������47
Floating-Point Numbers��������������������������������������������������47
Character Sets ������������������������������������������������������������48
Exercises �����������������������������������������������������������������������49
Expressions��������������������������������������������������������������������49
Arithmetic Expressions��������������������������������������������������50
Mixed-Mode Arithmetic and Type Conversions��������������������52
Exercises �����������������������������������������������������������������������53
Using Functions and Modules ��������������������������������������������54
Calling Functions: Arguments and Return Values ���������������54
The math Module ���������������������������������������������������������55
The Main Module�����������������������������������������������������������56
Program Format and Structure ���������������������������������������57
Running a Script from a Terminal Command Prompt�����������57
Exercises �����������������������������������������������������������������������59
Summary �����������������������������������������������������������������������59
Review Questions ������������������������������������������������������������61
Projects��������������������������������������������������������������������������62
Lifetime�������������������������������������������������������������������� 192
Using Keywords for Default and Optional Arguments�������� 193
Exercises �������������������������������������������������������������������� 194
Higher-Order Functions�������������������������������������������������� 195
Functions as First-Class Data Objects��������������������������� 195
viii Mapping�������������������������������������������������������������������� 196
Filtering�������������������������������������������������������������������� 197
Reducing ����������������������������������������������������������������� 197
Using lambda to Create Anonymous Functions �������������� 198
Creating Jump Tables�������������������������������������������������� 199
Exercises �������������������������������������������������������������������� 199
Summary �������������������������������������������������������������������� 200
Review Questions ��������������������������������������������������������� 202
Projects����������������������������������������������������������������������� 203
“Everyone should learn how to code.” That’s my favorite quote from Suzanne Keen, the
Thomas Broadus Professor of English and Dean of the College at Washington and Lee Uni-
versity, where I have taught computer science for more than 30 years. The quote also states
the reason why I wrote the first edition of Fundamentals of Python: First Programs, and why
I now offer you this second edition. The book is intended for an introductory course in pro-
gramming and problem solving. It covers the material taught in a typical Computer Science 1
course (CS1) at the undergraduate or high school level.
This book covers five major aspects of computing:
1. Programming Basics—Data types, control structures, algorithm development, and
program design with functions are basic ideas that you need to master in order to
solve problems with computers. This book examines these core topics in detail and
gives you practice employing your understanding of them to solve a wide range of
problems.
2. Object-Oriented Programming (OOP)—Object-oriented programming is the
dominant programming paradigm used to develop large software systems. This
book introduces you to the fundamental principles of OOP and enables you to
apply them successfully.
3. Data and Information Processing—Most useful programs rely on data structures
to solve problems. These data structures include strings, arrays, files, lists, and dic-
tionaries. This book introduces you to these commonly used data structures and
includes examples that illustrate criteria for selecting the appropriate data struc-
tures for given problems.
4. Software Development Life Cycle—Rather than isolate software development
techniques in one or two chapters, this book deals with them throughout in the
context of numerous case studies. Among other things, you’ll learn that coding a
program is often not the most difficult or challenging aspect of problem solving
and software development.
5. Contemporary Applications of Computing—The best way to learn about pro-
gramming and problem solving is to create interesting programs with real-world
applications. In this book, you’ll begin by creating applications that involve numeri-
cal problems and text processing. For example, you’ll learn the basics of encryption
techniques such as those that are used to make your credit card number and other
information secure on the Internet. But unlike many other introductory texts, this
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
P r e f a c e Why Python?
one does not restrict itself to problems involving numbers and text. Most contem-
porary applications involve graphical user interfaces, event-driven programming,
graphics, image manipulation, and network communications. These topics are not
consigned to the margins, but are presented in depth after you have mastered the
basics of programming.
xiv
Why Python?
Computer technology and applications have become increasingly more sophisticated over
the past three decades, and so has the computer science curriculum, especially at the intro-
ductory level. Today’s students learn a bit of programming and problem solving, and they
are then expected to move quickly into topics like software development, complexity analy-
sis, and data structures that, 30 years ago, were relegated to advanced courses. In addition,
the ascent of object-oriented programming as the dominant paradigm of problem solving
has led instructors and textbook authors to implant powerful, industrial-strength program-
ming languages such as C++ and Java in the introductory curriculum. As a result, instead
of experiencing the rewards and excitement of solving problems with computers, beginning
computer science students often become overwhelmed by the combined tasks of mastering
advanced concepts as well as the syntax of a programming language.
This book uses the Python programming language as a way of making the first year of
studying computer science more manageable and attractive for students and instructors
alike. Python has the following pedagogical benefits:
•• Python has simple, conventional syntax. Python statements are very close to those of
pseudocode algorithms, and Python expressions use the conventional notation found in
algebra. Thus, students can spend less time learning the syntax of a programming lan-
guage and more time learning to solve interesting problems.
•• Python has safe semantics. Any expression or statement whose meaning violates the
definition of the language produces an error message.
•• Python scales well. It is very easy for beginners to write simple programs in Python.
Python also includes all of the advanced features of a modern programming language,
such as support for data structures and object-oriented software development, for use
when they become necessary.
•• Python is highly interactive. Expressions and statements can be entered at an interpret-
er’s prompts to allow the programmer to try out experimental code and receive immedi-
ate feedback. Longer code segments can then be composed and saved in script files to
be loaded and run as modules or standalone applications.
•• Python is general purpose. In today’s context, this means that the language includes
resources for contemporary applications, including media computing and networks.
•• Python is free and is in widespread use in industry. Students can download Python to
run on a variety of devices. There is a large Python user community, and expertise in
Python programming has great résumé value.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Organization of the Book pr e f a c e
To summarize these benefits, Python is a comfortable and flexible vehicle for expressing
ideas about computation, both for beginners and for experts. If students learn these ideas
well in the first course, they should have no problems making a quick transition to other
languages needed for courses later in the curriculum. Most importantly, beginning students
will spend less time staring at a computer screen and more time thinking about interesting
problems to solve. xv
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
P r e f a c e Special Features
textbook: students learn that the easiest way to define a new class is to customize an exist-
ing class using subclassing and inheritance.
Chapter 9 continues the exploration of object-oriented design with the definition of entirely
new classes. Several examples of simple class definitions from different application domains
are presented. Some of these are then integrated into more realistic applications, to show
xvi how object-oriented software components can be used to build complex systems. Emphasis
is on designing appropriate interfaces for classes that exploit polymorphism.
Chapter 10 covers advanced material related to several important areas of computing:
concurrent programming, networks, and client/server applications. This chapter thus
gives students challenging experiences near the end of the first course. Chapter 10 intro-
duces multithreaded programs and the construction of simple network-based client/server
applications.
Chapter 11 covers some topics addressed at the beginning of a traditional CS2 course. This
chapter introduces complexity analysis with big-O notation. Enough material is presented
to enable you to perform simple analyses of the running time and memory usage of algo-
rithms and data structures, using search and sort algorithms as examples.
Special Features
This book explains and develops concepts carefully, using frequent examples and diagrams.
New concepts are then applied in complete programs to show how they aid in solving prob-
lems. The chapters place an early and consistent emphasis on good writing habits and neat,
readable documentation.
The book includes several other important features:
•• Case studies—These present complete Python programs ranging from the simple to
the substantial. To emphasize the importance and usefulness of the software develop-
ment life cycle, case studies are discussed in the framework of a user request, followed
by analysis, design, implementation, and suggestions for testing, with well-defined tasks
performed at each stage. Some case studies are extended in end-of-chapter program-
ming projects.
•• Chapter objectives and chapter summaries—Each chapter begins with a set of learning
objectives and ends with a summary of the major concepts covered in the chapter.
•• Key terms and a glossary—When a technical term is introduced in the text, it appears in
boldface. Definitions of the key terms are also collected in a glossary.
•• Exercises—Most major sections of each chapter end with exercise questions that rein-
force the reading by asking basic questions about the material in the section. Each chap-
ter ends with a set of review exercises.
•• Programming projects—Each chapter ends with a set of programming projects of vary-
ing difficulty.
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Visit https://ebookmass.com
now to explore a rich
collection of eBooks and enjoy
exciting offers!
Instructor Resources pr e f a c e
Instructor Resources
MindTap
MindTap activities for Fundamentals of Python: First Programs are designed to help stu-
dents master the skills they need in today’s workforce. Research shows employers need
critical thinkers, troubleshooters, and creative problem-solvers to stay relevant in our
fast-paced, technology-driven world. MindTap helps you achieve this with assignments
and activities that provide hands-on practice and real-life relevance. Students are guided
through assignments that help them master basic knowledge and understanding before
moving on to more challenging problems.
All MindTap activities and assignments are tied to defined unit learning objectives.
Hands-on coding labs provide real-life application and practice. Readings and dynamic
visualizations support the lecture, while a post-course assessment measures exactly how
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
P r e f a c e We Appreciate Your Feedback
much a student has learned. MindTap provides the analytics and reporting to easily see
where the class stands in terms of progress, engagement, and completion rates. Use the
content and learning path as-is or pick-and-choose how our materials will wrap around
yours. You control what the students see and when they see it. Learn more at http://www
.cengage.com/mindtap/.
xviii
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2019 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Random documents with unrelated
content Scribd suggests to you:
therefore take our leave of St. Francis, whose procession was in the
day time: but I must tell you it is only to inform you of another of a
much more awful and shocking nature, which I saw afterwards at
night. About ten o’clock, being deeply engaged in conversation with
my kind host, in came an Englishman, and told me in all haste, that
he had seen a train of near two hundred penitents passing along,
and that in all probability I might be gratified with the same sight, if I
hastened to a place whither he would conduct me. I very readily
obeyed the summons, and, as curiosity quickened my pace, we soon
came up with some of those poor creatures, who were then making
a halt, and kneeling in the street, whilst a friar from a high cross, with
an image of our Lord crucified in his hand, was preaching to them
and the populace with great vehemence. Sermon being ended, the
penitents went forwards, and several companies followed after with
their respective preaching friars at their head, bearing crucifixes.
These they pointed to and brandished frequently, and the hearers as
frequently beat their breasts, and clapped their cheeks. At proper
pauses they stopped and prayed, and one of them, more zealous
than the rest, before the King’s palace, sounded the word penitentia
through a speaking trumpet. The penitents themselves were clothed
and covered all over with white linen vestments, only holes were
made for their eyes to peep out at. All were bare-footed, and all had
long heavy chains fastened to their ancles, which, when dragged
along the street, made a dismal rattling: but though alike in dress, yet
in other respects there was great variety amongst them. For some
carried great stones on their backs, and others dead mens bones
and skulls in their hands. Some bore large and seemingly very heavy
crosses upon their shoulders, whilst others had their arms extended
quite wide, or carried a bow full of swords with the points
downwards. Most of them whipped and lashed themselves, some
with cords, and others with flat bits of iron. It being a moonshine
night, I could see them quite well; and indeed some of them struck
so hard, that I perceived their backs (left bare on purpose to be
slashed) were quite red, and swoln very much by the violence and
repetition of the blows. Had my dear friend been there, he would
have joined with me in saying, that the whole scene was horrible;—
so horrible, that, being informed it was to be continued till morning, I
was glad to return from whence I came about midnight.――Had you
been with me, I know you would have joined with me in praising and
gratefully adoring the Lord of all lords, for the great wonder of the
reformation, and also for that glorious deliverance wrought out for us
a few years past, in defeating the unnatural rebellion. O what a
mighty spirit and power from on high must Luther, Calvin,
Melancthon, Zuinglius, and those glorious reformers, be necessarily
endued with, who dared first openly to oppose and stem such a
torrent of superstition and spiritual tyranny! and what gratitude owe
we to those, who, under God, were instrumental in saving us from
the return of such spiritual slavery, and such blind obedience to a
papal power! To have had a papist for our king;—a papist, if not
born, yet from his infancy nursed up at Rome;—a papist, one of
whose sons is advanced to the ecclesiastical dignity of a Cardinal,
and both under the strongest obligations to support the interest of
that church, whose superstitions, as well as political state principles,
they have sucked in, and imbibed even from their infancy. But,
blessed be God, the snare is broken, and we are delivered. O for
protestant practices to be added to protestant principles! O for an
obediential acknowledgment to the ever-blessed God for our
repeated deliverances! But alas!――Pardon me, my dear friend, I
stop to weep. Adieu. I cannot enlarge, but leaving you to guess from
what source my tears flow, I must hasten to subscribe myself, my
dear Sir,
G. W.
LETTER MXXXVII.
To Mr. B――.
G. W.
LETTER MXXXVIII.
To Mrs. G――.
Dear Madam,
I HOPE this will find you more than happy, in the enjoyment of Him,
whose death and passion many at this season are peculiarly
called upon to remember, and be thankful for. Vast are the outward
preparations made here. Altars upon altars are erecting. Penitents
upon penitents are walking and lashing themselves: but what I want
to have erected and adorned, is an altar in my heart, and the blows
and lashes I desire to feel, are the crucifixion and mortification of the
old man and its deeds. Without this, all is mere parade. God be
praised for opening your eyes, and teaching you the holy art of
worshipping him in spirit and in truth. Is it not a glorious privilege?
Would you lose it for ten thousand worlds? Blessed be God, it is in
safe hands! The life of a believer is a hidden life; a life hid with
Christ in God. May the Author and Finisher thereof, cause it to
open and be displayed more and more every hour and every
moment in your heart! Thus prays, dear Madam,
G. W.
LETTER MXXXIX.
To Mr. H――.
G. W.
LETTER MXL.
Lisbon, April 12, 1754.
My dear Friend,
P ROVIDENCE still detains us at Lisbon, and therefore I know you
will be enquiring what more news from thence?—Truly, as
extraordinary as ever—for I have now seen the solemnities of an
Holy-Thursday, which is a very high day in this metropolis, and
particularly remarkable for the grand illuminations of the churches,
and the king’s washing twelve poor men’s feet.—Through the
interest of a friend, I got admittance into the gallery where the
ceremony was performed. It was large, and hung with tapestry; one
piece of which represented the humble Jesus washing the feet of his
disciples.—Before this, upon a small eminence, sat twelve men in
black. At the upper end, and in several other parts of the gallery,
were side-boards of large gold and silver basons and ewers most
curiously wrought; and near these a large table covered with a
variety of dishes, all cold, set off and garnished after the Portuguese
fashion. Public high mass being over, his majesty came in attended
with his nobles, who seemed to me to look like so many Roman
senators. The act of washing the feet, I did not get in time enough to
see; but that being ended, several of the young noblemen served up
the dishes to the king’s brother and uncles; these again handed
them to his majesty, who gave (I think) twelve of them in all to each
poor man. Every thing was carried on with a great deal of decency
and good humour. The young noblemen served very chearfully, their
seniors looked quite pleased, and the king and his royal relations
behaved in a very polite, easy manner,—upon the whole, though as
you may easily guess it was not an exact copy of the tapestry, yet,
as the poor mens cloaths and food, when sold, came to about ten
moidores; and as there was little mixture of superstition in it, I cannot
say but I was as well pleased with my morning’s entertainment as
with any thing I had seen since my arrival.—I believe the whole took
up near two hours. After dinner we went to see the churches; but the
♦magnificence and sumptuousness of the furniture, cannot well be
expressed.—Many of them were hung on the occasion with purple
damask trimmed with gold.—In one of them there was a solid silver
altar of several yards circumference, and near twelve steps high: and
in another a gold one, still more magnificent, of about the same
dimensions.—Its basis was studded with many precious stones, and
near the top were placed silver images, in representation of angels.
Each step was filled with large silver candlesticks, with wax-tapers in
them, which going up by a regular ascent, ’till they formed
themselves into a pyramid, made a most glittering and splendid
blaze.—The great altars also of the other churches were illuminated
most profusely, and silver pots of artificial flowers, with a large wax-
taper between each, were fixed all round several of them.—Between
these, were large paintings in black and white, representing the
different parts of our Saviour’s passion. And, in short, all was so
magnificently, so superstitiously grand, that I am persuaded several
thousands of pounds would not defray the expences of this one day.
Go which way you would, nothing was to be seen but illuminations
within, and hurry without.—For all persons, princes and crowned
heads themselves not excepted, are obliged on this day to visit
seven churches or altars, in imitation, as is supposed, of our Lord’s
being hurried from one tribunal to another, before he was
condemned to be hung upon the cross.—I saw the queen pass by in
great state to visit three of them. Velvet cushions were carried before
her Majesty, and boards laid along the streets for herself and retinue
to walk upon. Guards attended before and behind, and thousands of
spectators stood on each side to gaze at them as they passed along.
Being desirous of seeing the manner of their entrance, we got into
the last church before they came. It was that of St. Domingo, where
was the gold altar before mentioned, and at which her Majesty and
train knelt about a quarter of an hour.—All the while, the Dominican
friars sung most surprisingly sweet. But as I stood near the altar,
over against the great door, I must confess my very inmost soul was
struck with a secret horror, when, upon looking up, I saw over the
front of the great window of the church, the heads of many hundred
Jews, painted on canvas, who had been condemned by what they
call the Holy Inquisition, and carried out from that church to be burnt.
—Strange way this, of compelling people to come in! Such was not
thy method, O meek and compassionate Lamb of God! Thou camest
not to destroy mens lives, but to save them.—But bigotry is as cruel
as the grave.—It knows no remorse.—From all its bitter and dire
effects, good Lord deliver us!—But to return to the Queen. Having
performed her devotions, she departed and went in a coach of state,
I believe, directly from the church to her palace, and without doubt
sufficiently fatigued: for, besides walking through the streets to the
several churches, her Majesty also, and the princesses, had been
engaged in waiting upon, and washing the feet of twelve poor
women, in as public a manner as the king. In our walk home, we met
his Majesty with his brother and two uncles, attended only with a few
noblemen in black velvet, and a few guards without halberts. I
suppose he was returning from his last church, and, as one may well
imagine, equally fatigued with his royal consort and daughters.—
When church and state thus combine to be nursing fathers and
nursing mothers to superstition, is it any wonder that its credit and
influence is so diffusive among the populace?—O Britain! Britain!
hast thou but zeal proportionable to thy knowledge, and inward purity
adequate to the simplicity of thy external worship, in what a happy
and god-like situation wouldst thou be! Here I could weep again.—
Again I leave you to guess the cause; and if I can send you one
more letter of a like nature, before we leave this place, it is all you
must expect from, my dear friend,
G. W.
My dear Friend,
G. W.
LETTER MXLII.
To Mrs. D――.
G. W.
LETTER MXLIII.
To Mrs. S――.
You will find him a kind and faithful Saviour. Whom he loves, he loves
to the end. He hath already delivered you out of the paw of the bear
and of the lion, and he will also deliver out of the hand of every
remaining Goliah. Courage, then, my dear Mrs. S――, courage. The
crown is before you, and ere long Jesus will put it on your head. I
hope all your houshold, as well as yourself, have this in full view. It
glitters, though at this distance. O how bright and radiant! Purchased
at how dear a rate! It is worth striving for. The Lord help you all to
strive so as to obtain. So wishes and prays, dear Mrs. S――,
G. W.
LETTER MXLIV.
To Mr. H――.
G. W.
LETTER MXLV.
To Mr. S――.
My dear Friend,
T HROUGH the divine goodness, we are just now sailing into our
harbour, after having been six weeks from Lisbon.—
Providentially a ship goes out to-morrow for Cowes; I cannot omit the
opportunity of sending you a few friendly lines. They come from a
friend, and leave him leaning on Him who hath promised never to
forsake those that put their trust in him. Our passage hath been very
easy, only our entrance into the harbour (like our last struggle before
we enter heaven) hath been somewhat troublesome. May the Lord of
all Lords give you, and yours, and all my never to be forgotten
Yorkshire friends, an abundant entrance there! I must not think of you
too much; parting seasons would come too fresh in my mind.—O
blessed season, when we shall part no more! Adieu, adieu. I hope to
write soon again. My orphan-charge are all quite well, and I hope in a
few days to see them safe at Georgia. I know whose company would
be acceptable to all there; but,—Father thy will be done! I can no
more. Accept this as a token of love unfeigned, from, my dear friend,
G. W.
LETTER MXLVI.
Charles-Town, July 10, 1754.
S INCE I left Bethesda, I have been out two nights by land, and one
by water, and though wearied, am preserved in as good health
as can in any wise be expected. To-morrow or Monday, I expect to
embark again for New-York. The prospect of being ere long at the new
Jerusalem, makes all things easy. I thank you for your kind letter, and
for regarding my tears. They speak better than words. Jesus knows
they were shed for him, and for the welfare of that institution which has
lain so many years upon my poor heart. Have a little patience, and you
will find more and more, that your coming over the water was of God. I
wish it was in my power to make every thing more than agreeable; our
common Lord I trust will do it himself. This is my heart’s desire, and
shall be my constant prayer night and day. You will see what I have
sent by this opportunity. Whatever of the linen or woollen stuff you
would have made up for the children, may be sent by those who bring
this; and what you want done in this way, only let Mrs. B―― have a
line, and orders will be readily executed. Thus God raises up friends.
The Lord be with you all. Help me to praise him, and continue to pray
for, dear Mrs. C――,
G. W.
LETTER MXLVII.
To Mr. H――.
Charles-Town, July 12, 1754.
T HOUGH I hear that Captain Thompson does not sail, these three
weeks, yet as I am bound for the northward, I cannot help leaving
a few grateful lines behind me. May they find you leaning on the ever-
loving, ever-lovely Jesus, and determined through his strength
steadily to pursue that one thing needful, which shall never be taken
from you! My prayers are continually ascending in your behalf;—they
are your due; I owe you, and shall owe you much love as long as I
live. By this I send you most grateful acknowledgments for all favours,
—they are many, but all noted in my Master’s book. How are my
obligations to love and serve him increased! He gave us a pleasant
passage, and I trust hath blessed my ministry to some souls since my
arrival, and also hath given me to leave my orphan-charge in
comfortable circumstances; the family now consists of above an
hundred. He that fed the multitude in the wilderness, can and will feed
the orphans in Georgia. Your letters I delivered, and I suppose you will
receive proper answers.—But I find Mr. H―― doth not trade at
Lisbon, and Mr. H――m is about to leave off business and retire.
Happy they who can do this, and at the same time that they retire from
the world, retire into God. His presence is all in all. That you may be
blessed with a plentiful portion of it here, and be admitted to an
infinitely greater participation of it hereafter, is the earnest prayer of,
very dear Sir,
G. W.
LETTER MXLVIII.
To Mr. C―― W――.
On board the Deborah, July 20, 1754.
My dear Friend,
G. W.
LETTER MXLIX.
To Mr. D――.
G. W.