Instant Access to Introduction To Computing And Problem Solving Using Python 1st Edition E. Balaguruswamy ebook Full Chapters
Instant Access to Introduction To Computing And Problem Solving Using Python 1st Edition E. Balaguruswamy ebook Full Chapters
com
https://textbookfull.com/product/introduction-to-computing-
and-problem-solving-using-python-1st-edition-e-
balaguruswamy/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/python-programming-using-problem-
solving-approach-thareja-reema/
textboxfull.com
https://textbookfull.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-stormy-attaway/
textboxfull.com
https://textbookfull.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-stormy-attaway-2/
textboxfull.com
https://textbookfull.com/product/java-an-introduction-to-problem-
solving-and-programming-8th-edition-walter-savitch/
textboxfull.com
Introduction to Polymer Science and Chemistry A Problem
Solving Approach Second Edition Chanda
https://textbookfull.com/product/introduction-to-polymer-science-and-
chemistry-a-problem-solving-approach-second-edition-chanda/
textboxfull.com
https://textbookfull.com/product/problem-solving-in-foundation-
engineering-using-foundationpro-1st-edition-mohammad-yamin-auth/
textboxfull.com
https://textbookfull.com/product/problem-solving-in-data-structures-
algorithms-using-c-first-edition-jain/
textboxfull.com
https://textbookfull.com/product/introduction-to-radar-using-python-
and-matlab-lee-andrew-andy-harrison/
textboxfull.com
INTRODUCTION TO COMPUTING AND PROBLEM
SOLVING USING PYTHON
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
A recipient of numerous honors and awards, he has been listed in the Directory of Who’s Who of
Intellectuals and in the Directory of Distinguished Leaders in Education.
INTRODUCTION TO COMPUTING AND PROBLEM
SOLVING USING PYTHON
E Balagurusamy
Chairman
EBG Foundation
Coimbatore
Copyright © 2016 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.
Print Edition:
ISBN-13: 978-93-5260-258-2
ISBN-10: 93-5260-258-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
Acknowledgements xiii
Chapter 4 Functions 82
4.1 Introduction 82
4.2 Built-in Functions 82
4.3 Composition of Functions 88
4.4 User Defined Functions 89
4.5 Parameters and Arguments 92
4.6 Function Calls 96
4.7 The return Statement 97
4.8 Python Recursive Function 98
4.9 The Anonymous Functions 98
4.10 Writing Python Scripts 100
Always Remember 102
Key Terms 103
Review Exercises 104
Multiple Choice Questions 109
Short Questions 110
Answers to Multiple Choice Questions 111
Contents vii
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 the fundamentals of computation and problem solving
with Python for their undergraduate students. This book caters to those needs of the undergraduate students.
Web Supplements
The web supplements can be accessed at <http://highered.mheducation.com/sites/9352602587> which
contains the following:
● Solution Manual
● Lecture PPTs covering
1. Important standard library
(a) argparse
(b) csv
(c) math
(d) os
(e) pickle
(f) random
(g) subprocess
2. How to install third party libraries
(a) Using pip
(i) Installing pip under Windows and Linux
(ii) Using pip to install a package
(b) Installing packages from source.
Preface xi
A note of acknowledgement is due to the following reviewers of the book for their valuable suggestions:
Sujith Kumar
Sree Narayana Gurukulam College of Engineering, Kolenchery, Kerala
Jini Raju
Thangal Kunju Musaliar College of Engineering, Kollam, Kerala
Sanjiv Singh
Impetus Technologies, Noida, Uttar Pradesh
Aswathy Ravikumar
Mar Baselios College of Engineering and Technology, Thiruvananthapuram, Kerala
Pawan Kumar
Mphasis, Noida, Uttar Pradesh
A token of special appreciation to Mr. Jayarajan J N (Rajagiri School of Engineering and Technology,
Cochin) for his valuable contribution in development of this book.
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 [email protected]. Please mention the title and
authors’ name as the subject. In case you spot piracy of this book, please do let us know.
INTRODUCTION TO
1 DIGITAL COMPUTER
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. Processor: It is also known as the Central Processing Unit (CPU). The processor is the brain of the
computer. It takes data in the form of input and processes this input using arithmetic or logical operations in
the ALU, thereby transforming it into the output.
2. Memory (Storage): Memory refers to the data storage, permanent or temporary. Computer memory
understands only two bits, 0 and 1. The temporary memory is called RAM and the permanent memory is
called Read Only Memory (ROM).
3. Input/Output: It refers to the communication mechanism. Input and output devices are significant portions
of the computer accessories. Input devices provide data to the computer as input from the external source
while output devices generate information for the user after processing the input.
Storage
TIP
Before buying a computer, one should check the processor speed. To determine the processing
speed of the CPU, the clock speed is checked. The CPU can perform a certain number of
clock cycles per second. The computer’s clock speed is measured in gigahertz (GHz). One
GHz equals to one billion cycles per second. A higher clock speed indicates that the CPU
can execute more operations per second.
Note The very first commercially produced and sold computer in 1951 was UNIVAC.
● Arithmetic Logic Unit (ALU): The ALU performs both arithmetic and logical operations including
addition, subtraction, division and bits manipulation.
● Registers: Registers hold values in the CPU. Each register has a unique name and is capable of
holding a byte or word of data.
● Control Unit: The Control Unit controls the operation of the CPU, the Memory and the input-output
components based on a sequence of instructions in the Memory.
4. External Memory: The External Memory is a physical device used to store programs (set of instructions)
or data temporarily or permanently for use in a computer or some other digital electronic device. It is
classified into two categories which are as follows:
● Primary Memory: The primary memory is also known as main memory. The program is loaded in
the main memory before it can be executed. The information within the Primary Memory can be lost
when power to the computer is turned off. Thus, the Primary Memory is volatile by nature.
● Secondary Memory: The secondary memory is a non-volatile, low-speed memory. The information
within this memory will not be lost even if the computer is turned off due to power failure. Examples
of secondary storage include hard disk, DVD, floppy drive, etc.
5. Bus: In a computer, all the components described above are connected by cables and each cable can only
send one bit at a time. These cables are called bus and are responsible for the movement of data from input
devices to output devices.
Keyboard
ALU
Display
Registers Secondary
Memory
Printer
Storage Output
Devices
Central Processing Unit Bus
(CPU)
Computers have become a huge part of our life nowadays. We use them every day to complete different
tasks. They are basically composed of two main things-the software and the hardware. The software has all
the instructions and information needed for the computer to run. This includes the operating system and the
programs or applications. The hardware consists of all the physical elements that make the computer work.
This includes the CPU, RAM, ROM, Cache etc.
6 Introduction to Computing & Problem Solving using Python
Let us imagine a restaurant. Every day a keeper comes to open the restaurant and makes sure everything is
ready and working well. Here, the keeper and the computer is called read-only memory or ROM which can
be modified. To keep everything running properly in a restaurant we need an administrator, this is the central
processing unit or CPU. It is called a microprocessor in cell phones and it contains the arithmetic logic unit
or ALU and the control unit or CU. The ALU in a computer is the manager who takes care of the numbers
and logical part. The control unit is the head chef who organises the incoming information and gets everyone
task. Let us see a customer making an order. The order acts as the input data. The waiter or data bus then
carries this information to the kitchen, and then goes to the head chef who decides where it should go further.
The kitchen represents the mother board inside, where there is a fridge and you keep everything that is used
frequently for easy access. This is called random access memory or RAM in a computer. Cache will be like
a small recipe book in which the computer keeps the frequently used instructions. There is also a warehouse
for rest of the information stored and this works as a hard disk. We can also get the things delivered through
the back door which acts as an optical disc in the computer. These are called the secondary storage devices.
Let us imagine, we also have a timer in the kitchen. Every time the timer starts, everyone starts preparing
a dish and has to get it done by the time gets over, so this keeps everything synchronised. In a computer, it
is called the internal clock.
We get an order, the buses carry it and it goes through the control unit in the CPU which supervises that
it reaches the right destination. If we need something that has been recently used, we can easily get it from
RAM, and if not, then the computer has to look for it in the secondary storage devices. The data is processed
now, and it is time for the chefs to turn into some delicious food that we can eat. This is the task of the video
card converting data into images. This is how our computer works.
1.3 STORAGE
The term Storage refers to memory that retains computer programs and data. There are basically two
categories of storage: primary and secondary.
2. ROM (Read Only Memory): The Read Only Memory gets its name from the fact that the computer can
only read information from it but cannot write any information on it. A part of the operating system is
stored in ROM. When the computer system is turned on, the CPU executes instructions stored in ROM.
The information stored in ROM cannot be changed and will not be lost even if the computer is turned off.
3. Cache Memory: Cache memory stores the data recently processed by the CPU. The size of cache is very
small and execution is very fast. In order to process an application, processor first searches the cache memory
and then, the RAM.
3. Flash Drive: A flash drive can be inserted into a USB port for data retrieval and data storage. It is small
in size and portable. Nowadays, flash drive comes in many shapes.
4. Memory Card: A memory card is a very small data storage medium. It is portable and can be used in
remote computing devices.
5. Compact Disc: A compact disc is a kind of optical disc used to store digital data. Data can be accessed
faster here compared to the floppy discs, but it is still slower than the hard discs. A compact disc stores the
same data as a floppy disc does.
Note An early method used to store data or information in the computer was the Punch
card. The machine Analytical Engine invented by Charles Babbage had a punched card
system to store and retrieve information.
1.3.3 Register
It contains the address of the memory location where data resides. Register is highly accessible by the CPU.
Speed of the CPU is determined by the number of registers it has.
Memory hierarchy is the arrangement of the storage in a computer. Each level of memory hierarchy is
distinguished by the response time. It is illustrated in Figure 1.10.
Cache
Main Memory
Disk/Virtual Memory
Programming Languages
Machine Assembly
Language Language
TIP
If you want to learn programming languages, first choose a language that you want to
learn. After that, you need to learn the core concepts of that language. Install the software
that is required to compile the program. Now, create your first program.
1.5 TRANSLATORS
A translator is a computer program that can instantly translate between any languages. It converts program
language to machine level language for the debugging and execution of the programs. While the computer
understands only binary code i.e. 1’s and 0’s, it is not easy for humans to read and write in such code. So,
the translators are used to translate a computer program into binary code. There are three types of translator
programs, namely Compiler, Assembler, and Interpreter.
1.5.1 Compiler
A compiler is very important in giving the application a performance boost. The compiler of a language is
a computer program that converts the source code of an application written in the computer programming
language to the target language with its binary form.
The compiler checks for syntax errors in a source code of a program. If no error is found, the program
is declared to be successfully compiled. If the program does not contain any syntax error, the compiler
translates the source code of the program into the machine language of the computer, so that the computer
is able to understand the instructions given to it.
Source files are the program files created by a programmer. They contain information and instructions
written by the programmer, which are checked by the compiler during the process of compilation. These
source files are compiled by a compiler and run with an executable file.
1.5.2 Assembler
To translate the assembly language into machine language, a translator is needed. This translator is also
called an assembler. Each assembly language is unique to the particular computer architecture. In assembly
language, we use some mnemonic such as ‘add’, ‘sub’, ‘mul’ etc. for all the operations.
For example, if we want to add 4 and 3, then in assembly language, we will write Add 4 3 where Add
is a mnemonic and both 4 and 3 are the arguments of the operand. Now, the assembler will map this to the
binary code.
Introduction to Digital Computer 13
1.5.3 Interpreter
Like a compiler, an interpreter also translates high-level language into low-level machine language. An
interpreter reads the statement and first converts it into an intermediate code and executes it, before reading
the next statement. It translates each instruction immediately one by one. This is a rather slow process
because the interpreter has to wait while each instruction is being translated.
The interpreter stops execution at the time of error occurrence and reports it, whereas a compiler reads
the whole program even if it encounters several errors.
1.6.1 Hardware
Hardware are the physical components of the computer system. The hardware components consist of several
parts like input devices, Central Processing Unit (CPU), primary storage, output devices and auxiliary
storage devices.
1. Input Devices: These are the devices such as keyboards that are used to enter the program and data. Mouse
and audio input also fall in the category of input devices.
2. CPU: It processes all the instructions given to the computer and is also used for doing arithmetic
calculations and comparisons, and for controlling the movement of data.
3. Primary Storage: It is the main memory of the computer system. In primary storage, programs and data
are stored temporarily for processing. The data in the primary device is erased when the computer is turned
off.
4. Output Devices: Devices such as monitor or printer are used to get the output.
5. Auxiliary Storage: Programs and data are stored permanently in auxiliary storage. It is also known as
secondary storage and used for both input and output. This storage is very useful as the data remains stored
even when the computer is turned off.
14 Introduction to Computing & Problem Solving using Python
1.6.2 Software
Computer software is a collection of programs used to manage the entire file system of the computer. It is
also necessary for the running of computer hardware. The working of the computer hardware depends on
the computer software. Computer software is classified into two categories, namely, System software and
Application software.
1. System Software: The system software provides interface between the user and the hardware (components
of the computer). It also manages the system resources, enabling the working of all hardware components
(hard disk, RAM, CD drive, etc.) of the computer. Computer hardware resources are managed through this
system software with the help of programs.
These programs fall into following three types:
● Operating System: It provides the interface between the user and computer hardware, managing
all files and folders, and providing ease of access to the database. The operating system makes the
computer perform efficiently.
● System Support Software: It provides all the services of the operating system and system utilities.
For example, disk format program is the system utility made to do the formatting of the storage. Other
services include data encryption and bit lock for locking storage devices.
● System Development Software: It works as a language translator that converts program language to
machine level language for debugging and execution of the programs.
2. Application Software: The application software runs under the system software. It helps the user to solve
problems. It can be further classified into general-purpose software and application-specific software.
● General-Purpose Software: It refers to software meant to be used for more than one application.
For example, Word Processor.
● Application-Specific Software: As the name suggests, it refers to software generally used for
a specific, intended purpose. For example: a general account ledger used by the accountants for
managing accounts.
The examples of application software are as follows:
a) Microsoft Internet Explorer
b) VLC Media Player
c) Adobe Reader X
Note Auxiliary storage is very useful since when the computer is turned off, the data
remains in the secondary storage, ready for the next time we need it.
Operating System
Drives
(C:, D:, E: etc.) Monitor
Keyboard Printers
This was a time of great agitation for the two houses so close to each other,
with only a wall dividing the troubles of the one from the excitement of the
other, and a kind of strange union between them, linking them more closely
in the very attempt at disjunction. The greater part of the private commotion
which was going on, as it were, underground was concealed from Cara as
not a proper subject of discussion before her; but it was not necessary to
take any steps of the kind with Oswald, who, in his light-hearted
indifference, ignored it comfortably, and followed his own devices through
the whole without giving the other affairs a thought. After all, the idea of
anyone exciting him or herself over the question whether a respectable old
fogey, like Mr. Beresford, should go on paying perpetual visits to a
respectable matron like his mother, touched Oswald’s mind with a sense of
the ludicrous which surmounted all seriousness. If they liked it, what
possible harm could there be? He had not the uneasy prick of wounded
feeling, the sense of profanation which moved Edward at the idea of his
mother’s conduct being questioned in any way. Oswald was fond of his
mother, and proud of her, though he was disposed to smile at her absurd
popularity and the admiration she excited among her friends. He would
have thought it a great deal more natural that he himself should be the
object of attraction; but, granting the curious taste of society, at which he
felt disposed to laugh, it rather pleased him that his mother should be so
popular, still admired and followed at her age. He thought, like Mr.
Sommerville, that she was something of a humbug, getting up that pretence
of sympathy with everybody, which it was impossible anyone in her senses
could feel. But so long as it brought its reward, in the shape of so much
friendliness from everybody, and gratitude for the words and smiles, which
cost nothing, Oswald, at least, saw no reason to complain. And as for
scandal arising about Mr. Beresford! he could not but laugh; at their age! So
he pursued his easy way as usual, serenely lighthearted, and too much
occupied with his own affairs to care much for other people’s. In addition to
this, it must be added that Oswald was falling very deep in love. These
interviews between the hospital and the House were but meagre fare to feed
a passion upon; but the very slightness of the link, the oddity of the
circumstances, everything about it delighted the young man, who had
already gone through a great many drawing-room flirtations, and required
the help of something more piquant. He was very happy while they were all
so agitated and uncomfortable. Twice a week were hospital days, at which
he might hope to see her; and almost every morning now he managed to
cross the path of the little school procession, and, at least see her, if he did
not always catch the eye of the demure little teacher in her long cloak.
Sometimes she would look at him sternly, sometimes she gave him a semi-
indignant, sometimes a wholly friendly glance, sometimes, he feared, did
not perceive him at all. But that was not Oswald’s fault. He made a point of
taking off his hat, and indeed holding it in his hand a moment longer than
was necessary, by way of showing his respect, whether she showed any
signs of perceiving him or not. She went softly along the vulgar pavement,
with steps which he thought he could distinguish among all the others,
ringing upon the stones with a little rhythm of her own, about which he
immediately wrote some verses. All this he would tell to Cara, coming to
her in the morning before he set out to watch the children defiling out of the
House. And all the world thought, as was natural, that the subject of these
talks was his love for Cara, not his love, confided to Cara, for someone else.
As for Agnes, she not only saw Oswald every time he made his
appearance, whether she allowed him to know it or not, but she felt his
presence in every nerve and vein, with anger for the first day or two after
Roger’s visit, then with a softening of all her heart towards him as she
caught his reverential glance, his eager appeal to her attention. After all,
whispers to Cara, whom he had known all her life—little Cara, who even to
Agnes herself seemed a child—could not mean half so much as this daily
haunting of her own walks, this perpetual appearance wherever she was.
That was a totally different question from her own struggle not to notice
him, not to think of him. The fact that it was shocking and terrible on her
part to allow her mind to dwell on any man, or any man’s attentions, while
occupied in the work to which she had devoted herself, and filling almost
the position of a consecrated Sister, was quite a different thing from the
question whether he was a false and untrustworthy person, following her
with the devices of vulgar pursuit, a thing too impious to think of, too
humiliating. Agnes was anxious to acquit the man who admired and sought
her, as well as determined to reject his admiration; and, for the moment, the
first was actually the more important matter of the two. Herself she could
be sure of. She had not put her hand to the plough merely to turn back. She
was not going to abandon her ideal at the call of the first lover who held out
his hand to her. Surely not; there could be no doubt on that subject; but that
this generous, gentle young man, with those poetic sentiments which had
charmed yet abashed her mind, that he should be false to his fair exterior,
and mean something unlovely and untrue, instead of a real devotion, that
was too terrible to believe. Therefore, she did not altogether refuse to reply
to Oswald’s inquiries when the next hospital day brought about another
meeting. This time he did not even pretend that the meeting was accidental,
that he had been too late for making the proper inquiries in his own person,
but went up to her, eagerly asking for ‘our little patient,’ with all the
openness of a recognised acquaintance.
‘Emmy is better—if you mean Emmy,’ said Agnes, with great state.
‘The fever is gone, and I hope she will soon be well.’
‘Poor little Emmy,’ said Oswald; ‘but I don’t want her to be well too
soon—that is, it would not do to hurry her recovery. She must want a great
deal of care still.’
He hoped she would smile at this, or else take it literally and reply
seriously; but Agnes did neither. She walked on, with a stately air,
quickening her pace slightly, but not so as to look as if she were trying to
escape.
‘I suppose, as the fever is gone, she has ceased to imagine herself in
heaven,’ said Oswald. ‘Happy child! when sickness has such illusions, it is
a pity to be well. We are not so well off in our commonplace life.’
He thought she would have responded to the temptation and turned upon
him to ask what he meant by calling life commonplace; and indeed the wish
stirred Agnes so that she had to quicken her pace in order to resist the bait
thus offered. She said nothing, however, to Oswald’s great discomfiture,
who felt that nothing was so bad as silence, and did not know how to
overcome the blank, which had more effect on his lively temperament than
any amount of disapproval and opposition. But he made another valorous
effort before he would complain.
‘Yours, however, is not a commonplace life,’ he said. ‘We worldlings
pay for our ease by the sense that we are living more or less ignobly, but it
must be very different with you who are doing good always. Only, forgive
me, is there not a want of a little pleasure, a little colour, a little brightness?
The world is so beautiful,’ said Oswald, his voice slightly faltering, not so
much from feeling, as from fear that he might be venturing on dubious
ground. ‘And we are so young.’
That pronoun, so softly said, with such a tender emphasis and meaning,
so much more than was ever put into two letters before, went to the heart of
Agnes. She was trying so hard to be angry with him, trying to shut herself
against the insinuating tone of his voice, and those attempts to beguile her
into conversation. All the theoretical fervour that was in her mind had been
boiling up to reply, and perhaps her resolution would not have been strong
enough to restrain her, had not that we come in, taking the words from her
lips and the strength from her mind. She could neither protest against the
wickedness and weakness of consenting to live an ignoble life, nor
indignantly declare that there was already more than pleasure, happiness,
and delight in the path of self-sacrifice, when all the force was stolen out of
her by that tiny monosyllable—we! How dared he identify himself with
her? draw her into union with him by that little melting yet binding word?
She went on faster than ever in the agitation of her thoughts, and was
scarcely conscious that she made him no answer; though surely what he had
said called for some reply.
Oswald was at his wit’s end. He did not know what to say more. He
made a little pause for some answer, and then getting none, suddenly
changed his tone into one of pathetic appeal. ‘Are you angry with me? ‘he
said. ‘What have I done? Don’t you mean to speak to me any more?’
‘Yes,’ she said, turning suddenly round, so that he could not tell which of
his questions she was answering. ‘I am vexed that you will come with me.
Gentlemen do not insist on walking with ladies to whom they have not been
introduced—whom they have met only by chance——’
He stopped short suddenly, moved by the accusation; but unfortunately
Agnes too, startled by his start, stopped also, and gave him a curious, half-
defiant, half-appealing look, as if asking what he was going to do; and this
look took away all the irritation which her words had produced. He
proceeded to excuse himself, walking on, but at a slower pace, compelling
her to wait for him—for it did not occur to Agnes, though she had protested
against his company, to take the remedy into her own hands, and be so rude
as to break away.
‘What could I do?’ he said piteously. ‘You would not tell me even your
name—you know mine. I don’t know how to address you, nor how to seek
acquaintance in all the proper forms. It is no fault of mine.’
This confused Agnes by a dialectic artifice for which she was not
prepared. He gave a very plausible reason, not for the direct accusation
against him, but for a lesser collateral fault. She had to pause for a moment
before she could see her way out of the maze. ‘I did not mean that. I meant
you should not come at all,’ she said.
‘Ah! you cannot surely be so hard upon me,’ cried Oswald, in real terror,
for it had not occurred to him that she would, in cold blood, send him away.
‘Don’t banish me!’ he cried. ‘Tell me what I am to do for the introduction—
where am I to go? I will do anything. Is it my fault that I did not know you
till that day?—till that good child, bless her, broke her leg. I shall always be
grateful to poor little Emmy. She shall have a crutch of gold if she likes.
She shall never want anything I can give her. Do you think I don’t feel the
want of that formula of an introduction? With that I should be happy. I
should be able to see you at other times than hospital days, in other places
than the streets. The streets are beautiful ever since I knew you,’ cried the
young man, warming with his own words, which made him feel the whole
situation much more forcibly than before, and moved him at least, whether
they moved her or not.
‘Oh!’ cried Agnes, in distress, ‘you must not talk to me so. You must not
come with me, Mr. Meredith; is not my dress enough——’
‘There now!’ he said, ‘see what a disadvantage I am under. I dare not
call you Agnes, which is the only sweet name I know. And your dress! You
told me yourself you were not a Sister.’
‘It is quite true,’ she said, looking at him, trying another experiment. ‘I
am a poor teacher, quite out of your sphere.’
‘But then, fortunately, I am not poor,’ said Oswald, almost gaily, in
sudden triumph. ‘Only tell me where your people are, where I am to go for
that introduction. I thank thee, Lady Agnes, Princess Agnes, for teaching
me that word. I will get my introduction or die.’
‘Oh, here we are at the House!’ she cried suddenly, in a low tone of
horror, and darted away from him up the steps to the open door. Sister Mary
Jane was standing there unsuspicious, but visibly surprised. She had just
parted with someone, whom poor Agnes, in her terror, ran against; for in the
warmth of the discussion they had come up to the very gate of the House,
the entrance to that sanctuary where lovers were unknown. Sister Mary Jane
opened a pair of large blue eyes, which Oswald (being full of admiration for
all things that were admirable) had already noted, and gazed at him,
bewildered, letting Agnes pass without comment. He took off his hat with
his most winning look of admiring respectfulness as he went on—no harm
in winning over Sister Mary Jane, who was a fair and comely Sister, though
no longer young. Would Agnes, he wondered, have the worldly wisdom to
make out that he was an old acquaintance, or would she confess the truth?
Would Sister Mary Jane prove a dragon, or, softened by her own beauty and
the recollection of past homages, excuse the culprit? Oswald knew very
well that anyhow, while he walked off unblamed and unblamable, the girl
who had been only passive, and guilty of no more than the mildest
indiscretion, would have to suffer more or less. This, however, did not
move him to any regret for having compromised her. It rather amused him,
and seemed to give him a hold over her. She could not take such high
ground now and order him away. She was in the same boat, so to speak.
Next time they met she would have something to tell which he would
almost have a right to know. It was the establishing of confidence between
them. Oswald did not reckon at a very serious rate the suffering that might
arise from Sister Mary Jane’s rebuke. ‘They have no thumbscrews in those
new convents, and they don’t build girls up in holes in the walls now-a-
days,’ he said to himself, and, on the whole, the incident was less likely to
end in harm than in good.
Agnes did not think so, who rushed in—not to her room, which would
have been a little comfort, but to the curtained corner of the dormitory, from
which she superintended night and day ‘the middle girls,’ who were her
charge, and where she was always afraid of some small pair of peeping eyes
prying upon her seclusion. She threw off her bonnet, and flung herself on
her knees by the side of her little bed. ‘Oh, what a farce it was,’ she
thought, to cover such feelings as surged in her heart under the demure
drapery of that black cloak, or to tie the conventual bonnet over cheeks that
burned with blushes, called there by such words as she had been hearing!
She bent down her face upon the coverlet and cried as if her heart would
break, praying for forgiveness, though these same foolish words would run
in and out of her prayers, mixing with her heart-broken expressions of
penitence in the most bewildering medley. After all, there was no such
dreadful harm done. She was not a Sister, nor had she ever intended to be a
Sister, but that very simple reflection afforded the fanciful girl no comfort.
She had come here to seek a higher life, and lo, at once, at the first
temptation, had fallen—fallen, into what? Into the foolishness of the
foolishest girl without an ideal—she whose whole soul had longed to lay
hold on the ideal, to get into some higher atmosphere, on some loftier level
of existence. It was not Sister Mary Jane she was afraid of, it was herself
whom she had so offended; for already, could it be possible? insidious
traitors in her heart had begun to ply her with suggestions of other kinds of
perfection; wicked lines of poetry stole into her head, foolish stories came
to her recollection. Oh! even praying, even penitence were not enough to
keep out this strife. She sprang to her feet, and rushed to St. Cecilia, the
room which was her battleground, and where the noise of the girls putting
away their books and work, and preparing to go to tea, promised her
exemption, for a little while at least, from any possibility of thought. But
Agnes was not to be let off so easily. In the passage she met Sister Mary
Jane. ‘I was just going to send for you,’ said the Sister, benign but serious.
‘Come to my room, Agnes. Sister Sarah Ann will take the children to tea.’
Agnes followed, with her heart, she thought, standing still. But it would
be a relief to be scolded, to be delivered from the demon of self-reproach in
her own bosom. Sister Mary Jane seated herself at a table covered with
school-books and account-books, in the little bare room, laid with matting,
which was all the House afforded for the comfort of its rulers. She pointed
to a low seat which all the elder girls knew well, which was the stool of
repentance for the community. ‘My dear,’ said Sister Mary Jane, ‘did you
know that gentleman in the world? Tell me truly, Agnes. You are only an
associate: you are not under our rule, and there is no harm in speaking to an
acquaintance. But so long as anyone wears our dress there must be a certain
amount of care. Did you know him, my dear, tell me, in the world?’
Agnes could not meet these serious eyes. Her head drooped upon her
breast. She began to cry. ‘I do not think it was my fault. Oh, I have been
wrong, but I did not mean it. It was not my fault.’
‘That is not an answer, my dear,’ said Sister Mary Jane.
And then the whole story came rushing forth with sobs and excuses and
self-accusations all in one. ‘It is the badness in my heart. I want to be above
the world, but I cannot. Things come into my mind that I don’t want to
think. I would rather, far rather, be devoted to my work, and think of
nothing else, like you, Sister Mary Jane. And then I get tempted to talk, to
give my opinion. I was always fond of conversation. Tell me what to do to
keep my course straight, to be like you. Oh, if I could keep steady and think
only of one thing! It is my thoughts that run off in every direction: it is not
this gentleman. Oh, what can one do when one’s heart is so wrong!’
Sister Mary Jane listened with a smile. Oswald’s confidence in her
beautiful eyes was perhaps not misplaced. And probably she was conscious
now and then of thinking of something else as much as her penitent. She
said, ‘My dear, I don’t think you have a vocation. I never thought it. A girl
may be a very good girl and not have a vocation. So you need not be very
unhappy if your thoughts wander; all of us have not the same gifts. But,
Agnes, even if you were in the world, instead of being in this house, which
should make you more careful, you would not let a gentleman talk to you
whom you did not know. You must not do it again.’
‘It was not meant badly,’ said Agnes, veering to self-defence. ‘He
wanted to know how little Emmy was. It was the gentleman who carried her
to the hospital. It was kindness; it was not meant for——’
‘Yes, I saw who it was. And I can understand how it came about. But it
is so easy to let an acquaintance spring up, and so difficult to end it when it
has taken root. Perhaps, my dear, you had better not go to little Emmy
again.’
‘Oh!’ Agnes gave a cry of remonstrance and protest. It did not hurt her
to be told not to speak to him any more—but not to go to little Emmy! She
was not sure herself that it was all for little Emmy’s sake, and this made her
still more unhappy, but not willing to relinquish the expedition. Sister Mary
Jane, however, took no notice of the cry. She put a heap of exercises into
Agnes’s hands to be corrected. ‘They must all be done to-night,’ she said,
calculating with benevolent severity that this would occupy all the available
time till bedtime. ‘One nail drives out another,’ she said to herself, being an
accomplished person, with strange tongues at her command. And thus she
sent the culprit away, exhausted with tears and supplied with work. ‘I will
send you some tea to St. Monica, where you can be quiet,’ she said. And
there Agnes toiled all the evening over her exercises, and had not a moment
to spare. ‘Occupation, occupation,’ said the Sister to herself; ‘that is the
only thing. She will do very well if she has no time to think.’
But was that the ideal life? I doubt if Sister Mary Jane thought so; but
she was old enough to understand the need of such props, which Agnes was
still young enough to have indignantly repudiated. For her part, Agnes felt
that a little more thought would save her. If she could get vain imaginations
out of her head, and those scraps of poetry, and bits of foolish novels, and
replace them with real thought—thought upon serious subjects, something
worthy the name—how soon would all those confusing, tantalising shadows
flee away! But, in the meantime, it is undeniable that the girl left this
interview with a sense of relief, such as it is to be supposed, is one of the
chief reasons why confession continues to hold its place, named or
nameless, in all religious communions more or less. Sister Mary Jane was
not the spiritual director of the community, though I think the place would
have very well become her; but it was undeniable that the mind of Agnes
was lightened after she had poured forth her burdens; also that her sin did
not look quite so heinous as it had done before; also that the despair which
had enveloped her, and of which the consciousness that she must never so
sin again formed no inconsiderable part, was imperceptibly dispelled, and
the future as well as the past made less gloomy. Perhaps, if any very
searching inspection had been made into those recesses of her soul which
were but imperfectly known to Agnes herself, it might have been read there
that there was no longer any crushing weight of certainty as to the absolute
cessation of the sin; but that was beyond the reach of investigation.
Anyhow, she had no time to think any more. Never had exercises so bad
come under the young teacher’s inspection; her brain reeled over the mis-
spellings, the misunderstandings. Healthy human ignorance, indifference,
opacity, desire to get done anyhow, could not have shown to greater
advantage. They entirely carried out the intentions of Sister Mary Jane, and
left her not a moment for thought, until she got to her recess in the
dormitory. And then, after the whisperings were all hushed, and the lights
extinguished, Agnes was too tired for anything but sleep—a result of
occupation which the wise Sister was well aware of too. Indeed, everything
turned out so well in the case of this young penitent, that Sister Mary Jane
deemed it advisable not to interfere with the visits to the hospital. If she
surmounted temptation, why, then she was safe; if not, other steps must be
taken. Anyhow, it was well that her highly-wrought feelings and desire of
excellence should be put to the test; and as Agnes was not even a Postulant,
but still in ‘the world,’ an unwise backsliding of this kind was less
important. No real harm could come to her. Nevertheless, Sister Mary Jane
watched her slim figure disappear along the street from her window with
unusual interest. Was it mere interest in little Emmy that had made the girl
so anxious to go, or was she eager to encounter the test and try her own
strength? Or was there still another reason, a wish more weak, more human,
more girlish? Agnes walked on very quickly, pleased to find herself at
liberty. She was proud of the little patient, whose small face brightened with
delight at the sight of her. And she did not like the sensation of being shut
up out of danger, and saved arbitrarily from temptation. Her heart rose with
determination to keep her own pure ideal path, whatever solicitations or
blandishments might assail her. And indeed, to Agnes, as to a knight of
romance, it is not to be denied that ‘the danger’s self was lure alone.’
CHAPTER XXVIII.
THE FIRESIDE.
It is very hard to be obliged to alter our relationships with our friends, and
still more hard to alter the habits which have shaped our lives. Mr.
Beresford, when he was forbidden to continue his visits to his neighbour,
was like a man stranded, not knowing what to make of himself. When the
evening came he went to his library as usual, and made an attempt to settle
to his work, as he called it. But long before the hour at which with placid
regularity he had been used to go to Mrs. Meredith’s he got uneasy.
Knowing that his happy habit was to be disturbed, he was restless and
uncomfortable even before the habitual moment came. He could not read,
he could not write—how was he to spend the slowing-moving moments,
and how to account to her for the disturbance of the usual routine? Should
he write and tell her that he was going out, that he had received a sudden
invitation or a sudden commission. When he was debating this question in
his mind, Edward came in with a very grave face to say that his mother was
ill and unable to see anyone.
‘She said you had better be told,’ said Edward; ‘she has gone to her
room. She has a—headache. She cannot see anyone to-night.’
‘Mr. Sommerville has been with you; has he anything to do with your
mother’s headache?’
‘I think so,’ said Edward, angrily—‘old meddler; but she seems to think
we must put up with him. I wish my father would come home and look after
his own affairs.’
‘It was a mission from your father, then?’ Mr. Beresford was silent for a
moment, thinking with somewhat sombre dissatisfaction of the absent
Meredith. Would it be so pleasant to see him come home? Would the
unaccustomed presence of the master be an advantage to the house? He
could not be so insincere as to echo Edward’s wish; but he was moved
sympathetically towards the youth, who certainly was quite unsuspicious of
him, whatever other people might be. ‘Go upstairs and see Cara,’ he said;
‘she is in the drawing-room.’
The young man’s face brightened. Oswald was absent; he was not as
usual in his brother’s way; and though Edward had agreed loyally to accept
what he supposed to be the state of affairs and school himself to look upon
Cara as his future sister, that was no reason—indeed it was rather the
reverse of a reason—for avoiding her now. He went upstairs with a kind of
sweet unhappiness in his heart. If Cara was not for him, he must put up with
it; he must try to be glad if she had chosen according to her own happiness.
But in the meantime he would try to forget that, and take what pleasure
heaven might afford him in her society—a modified imperfect happiness
with an after-taste of bitterness in it—but still better than no consolation at
all.
Cara was with her aunt in the drawing-room, and they both welcomed
him with smiles. Miss Cherry, indeed, was quite effusive in her pleasure.
‘Come and tell us all the news and amuse us,’ she said; ‘that is the chief
advantage of having men about. My brother is no good, he never goes out;
and if he did go out, he never comes upstairs. I thought Oswald would have
come this evening,’ Miss Cherry said, in a tone which for her sounded
querulous; and she looked from one to the other of the young people with a
curious look. She was not pleased to be left out of Cara’s confidence, and
when they excused Oswald with one breath, both explaining eagerly that
they had known of his engagement, Miss Cherry was if anything worse
offended still. Why should not they be open, and tell everything? she
thought.
‘Besides,’ said Cara, very calmly, ‘Oswald never comes here in the
evening: he has always so many places to go to, and his club. Edward is too
young to have a club. Why should people go out always at night? Isn’t it
pleasant to stay at home?’
‘My dear, gentlemen are not like us,’ said Miss Cherry, instinctively
defending the absent, ‘and to tell the truth, when I have been going to the
play, or to a party—I mean in my young days—I used to like to see the
lighted streets—all the shops shining, and the people thronging past on the
pavement. I am afraid it was a vulgar taste; but I liked it. And men, who can
go where they please—— I am very sorry that your mamma has a
headache, Edward. She is not seeing anyone? I wonder what James——?’
Here she stopped abruptly and looked conscious, feeling that to discuss her
brother with these young persons would be very foolish. Fortunately they
were occupied with each other, and did not pay much attention to what she
said.
‘Oh, Edward,’ said Cara, ‘stay and read to us! There is nothing I like so
much. It is always dull here in the evenings, much duller than at the Hill,
except when we go out. And Aunt Cherry has her work, and so have I. Sit
here—here is a comfortable chair close to the lamp. You have nothing
particular to do, and if your mother has a headache, she does not want you.’
‘I don’t require to be coaxed,’ said Edward, his face glowing with
pleasure; and then a certain pallor stole over it as he said to himself, she is
treating me like her brother; but even that was pleasant, after a sort. ‘I am
quite willing to read,’ he said; ‘what shall it be? Tell me what book you like
best.’
‘Poetry,’ said Cara; ‘don’t you like poetry, Aunt Cherry? There is a novel
there; but I prefer Tennyson. Mr. Browning is a little too hard for me. Aunt
Cherry, Edward is very good when he reads out loud. You would like to
hear “Elaine”?’
‘Ye-es,’ said Miss Cherry. She cast a regretful glance at the novel, which
was fresh from Mudie’s; but soon cheered up, reflecting that she was half
through the second volume, and that it would not be amusing to begin it
over again. ‘In my young days stories would bear reading two or three
times over,’ she said, unconsciously following out her own thought; ‘but
they have fallen off like everything else. Yes, my dear, I am always fond of
poetry. Let me get my work. It is the new kind of art-needlework, Edward. I
don’t know if you have seen any of it. It is considered a great deal better in
design than the Berlin work we used to do, and it is a very easy stitch, and
goes quickly. That is what I like in it. I must have the basket with all my
crewels, Cara, and my scissors and my thimble, before he begins. I hate
interrupting anyone who is reading. But you are only hemming, my dear.
You might have prettier work for the drawing-room. I think girls should
always have some pretty work in hand; don’t you think so, Edward? It is
pleasanter to look at than that plain piece of white work.’
‘I should think anything that Cara worked at pretty,’ said Edward,
forgetting precaution. Miss Cherry looked up at him suddenly with a little
alarm, but Cara, who was searching for the crewels, and the thimble and the
scissors, on a distant table, fortunately did not hear what he said.
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.
textbookfull.com