Problem Solving and Python Programming E. Balagurusamy 2024 Scribd Download
Problem Solving and Python Programming E. Balagurusamy 2024 Scribd Download
com
https://ebookmass.com/product/problem-solving-and-python-
programming-e-balagurusamy/
OR CLICK HERE
DOWLOAD NOW
https://ebookmass.com/product/programming-for-problem-solving-e-
balagurusamy/
ebookmass.com
https://ebookmass.com/product/programming-and-problem-solving-with-
python-ashok-namdev-kamthane/
ebookmass.com
https://ebookmass.com/product/python-programming-using-problem-
solving-approach-1st-edition-reema-thareja/
ebookmass.com
https://ebookmass.com/product/breakheart-hill-thomas-h-cook/
ebookmass.com
Gender and HIV in South Africa 1st ed. Edition Courtenay
Sprague
https://ebookmass.com/product/gender-and-hiv-in-south-africa-1st-ed-
edition-courtenay-sprague/
ebookmass.com
https://ebookmass.com/product/advantages-and-pitfalls-of-pattern-
recognition-selected-cases-in-geophysics-volume-3-1st-edition-horst-
langer/
ebookmass.com
https://ebookmass.com/product/bioquimica-medica-5a-edicion-john-w-
baynes-marek-h-dominiczak/
ebookmass.com
https://ebookmass.com/product/a-black-winter-a-seasons-novel-office-
billionaire-romance-the-seasons-series-book-2-kate-smoak/
ebookmass.com
https://ebookmass.com/product/etextbook-pdf-for-americas-history-
concise-edition-volume-1-9th-edition/
ebookmass.com
Figuring Racism in Medieval Christianity M. Lindsay Kaplan
https://ebookmass.com/product/figuring-racism-in-medieval-
christianity-m-lindsay-kaplan/
ebookmass.com
Problem Solving and
Python Programming
About the Author
E Balagurusamy is presently the Chairman of EBG Foundation, Coimbatore. In the past he has also held the
positions of member, Union Public Service Commission, New Delhi and Vice-Chancellor, Anna University,
Chennai, Tamil Nadu. He is a teacher, trainer and consultant in the fields of Information Technology and
Management. He holds an ME (Hons) in Electrical Engineering and PhD in Systems Engineering from the
Indian Institute of Technology, Roorkee, Uttarakhand. His areas of interest include Object-Oriented Software
Engineering, E-Governance: Technology Management, Business Process Re-engineering and Total Quality
Management.
A prolific writer, he has authored a large number of research papers and several books. His best-selling
books, among others include:
● Programming in ANSIC, 7/e
● Fundamentals of Computers
● Numerical Methods
● Reliability Engineering
E Balagurusamy
Chairman
EBG Foundation
Coimbatore
Copyright © 2018 by McGraw Hill Education (India) Private Limited. No part of this publication may be reproduced or distributed in
any form or by any means, electronic, mechanical, photocopying, recording, or otherwise or stored in a database or retrieval system
without the prior written permission of the publishers. The program listings (if any) may be entered, stored and executed in a computer
system, but they may not be reproduced for publication.
1 23456789 D101417 22 21 20 19 18
Printed and bound in India
Print Edition:
ISBN-13: 978-93-87067-01-1
ISBN-10: 93-87067-01-7
Information contained in this work has been obtained by McGraw Hill Education (India), from sources believed to be reliable. However,
neither McGraw Hill Education (India) nor its authors guarantee the accuracy or completeness of any information published herein,
and neither McGraw Hill Education (India) nor its authors shall be responsible for any errors, omissions, or damages arising out
of use of this information. This work is published with the understanding that McGraw Hill Education (India) and its authors are
supplying information but are not attempting to render engineering or other professional services. If such services are required, the
assistance of an appropriate professional should be sought.
Typeset at The Composers, 260, C.A. Apt., Paschim Vihar, New Delhi 110 063 and printed at
Cover Printer:
Preface ix
Unit 3: Functions
Developments in the field of digital electronics and the huge amount of data generated during the last
few decades ushered in the second Industrial Revolution which is popularly referred to as the Information
Revolution. Information technology played an ever-increasing role in this new revolution. A sound knowledge
of how computers work, process and analyze data has, therefore, become indispensable for everyone who
seeks employment not only in the area of IT, but also in any other fields. Rightly so, many institutions and
universities in India have introduced a subject covering Problem Solving and Python Programming for their
undergraduate students. This book caters to those needs of the undergraduate students.
Publisher’s Note
Remember to write to us. We look forward to receiving your feedback, comments, and ideas to enhance
the quality of this book. You can reach us at info.india@mheducation.com. Please mention the title and
authors’ name as the subject. In case you spot piracy of this book, please do let us know.
Unit 1
Introduction to Computing and
Algorithmic Problem Solving
1.1 IntroductIon
In earlier days, the term “digital computer” was used to refer a person who drew mathematical tables and
solved complex calculations. In less than a human lifetime, computers have changed from massive, expensive
and unreliable calculators to the dependable and versatile machines that are now omnipresent in society.
Computers were once the size of rooms and used to take a day to change the program and now, it is just a
double click away. Computers help the impossible become possible. They have become a necessary tool in
today’s society. Without computers, it is hard to do pretty much anything. Computers process information in
1’s and 0’s (usually referred to as On and Off respectively). This operation identifies instructions in Binary
Code. This is the language understood by the computer to complete a command. By 1953, it was estimated
that there were almost 100 computers in the world.
It is believed that the first computer was invented in Berlin, Germany, in 1936.
● The Z1 was invented in 1936 by Konrad Zuse in Germany. This was a programmable machine that
1944. It was a large calculator. This computer was able to calculate many different types of numbers.
● With the advancement of technology and research, major companies like IBM, Apple, and Intel have
contributed to the explosion of the personal computers as we know today. For example, Apple 1 was
released in 1976 which was having memory of 4 KB expandable to 8 KB. The Macintosh was released
in 1984 which was having memory of 64 KB expandable to 256 KB.
● CSIRAC was the first computer to play digital music in 1949.
● UNIVAC 1 was used by CBS to predict the results of the 1952 presidential elections in USA.
● COBOL (Common Business Oriented Language), one of the oldest programming languages, was
● Single - board computer known as apple -1 was designed by Steve Wozniak some more important
developments and was marketed by his friend Steve Jobs.
● In 1980 IBM introduced its Personal Computers (PC). The first IBM PC was known as IBM Model
window's NT
● In 1994 Sony entred the home gaming market with release of play station console.
A Personal Computer (PC) is a digital computer designed for the usage by one person at a time. PCs
can be classified into desktop computers, workstations and laptop computers. Today, PCs have five major
applications which are as follows:
1. Internet Browser: Internet browser is a software application used to access the Internet. For example,
Internet Explorer, Firefox, Opera, etc., are all Internet browsers.
2. Data Compression Software: Data compression software is used to reduce file size. ZIP is widely used
as the data compression software on personal computers.
3. Windows Media Player: Windows Media Player is used to create music libraries for listening music.
4. Image Editing Software: Image editing software is used to develop good quality pictures. Examples of
such software include Photoshop, Microsoft Publisher and Picasa.
5. Audio Editing Software: Audio editing software is used to edit audio files and also to add audio effects.
Note The first personal computer was Altair 8800. Later IBM introduced IBM PC.
Computers have become an integral part of the society because of the following characteristics they
possess:
● A computer can perform millions of calculations in a second.
● A computer can store billions of bytes of information. For example, the capacity of a terabyte =
2,00,000 songs.
● A computer can work continuously without getting tired.
execution. The information can be stored by using compact disk (CD), floppy, etc.
2. Data or programs are stored into the main memory.
3. Processing of instructions is sequential.
Note A process describes how the processor takes the data or program, decodes it and
finally executes it. The fetch-decode-execute cycle is also known as the Von Neumann
execution cycle.
1. 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.
8 Problem Solving and Python Programming
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 15
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.
16 Problem Solving and Python Programming
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
ALWAYS REMEMBER
● The Von Neumann architecture is also known as “stored-program” architecture because in this architecture,
the program data and instruction data are stored in the same memory.
● The basic structure of Von Neumann architecture consists of the memory, the processing unit and the
control unit.
● In the central processing unit (CPU) there is a control unit that manages the process of data or program.
● Input devices are used to give data to the computer as input from the external source.
● Output devices are used to convey the information after processing to the user.
● Primary storage is also known as temporary storage and is used for storing data and programs temporarily.
● Secondary storage is also known as permanent storage. Examples of secondary storage include the hard
drive, DVD and memory card.
● The computer understands only machine language. All instructions are written in 1s and 0s form.
● When a high-level language is translated into machine language, there are two ways to translate it:
compiled or interpreted.
● Hardware is the physical component of the computer system. It consists of several parts including input
devices, CPU, primary storage, output devices and auxiliary storage devices.
● Computer software is used to manage the entire file system of the computer and is necessary for the
running of computer hardware.
● The operating system can allow users to do multitasking, by allowing two or more than two programs to
be run simultaneously on a single operating system.
● The compiler checks for syntax error in a source code of a program.
● The interpreter stops execution when an error occurs and reports it, whereas a compiler reads the whole
program even if it encounters several errors.
KEY TERMS
✓ ARITHMETIC LOGIC UNIT (ALU): It is useful in arithmetic and logical calculations, such as addi-
tion, subtraction, division and comparisons.
✓ ASSEMBLER: It translates the assembly language to machine language.
✓ BIT: Bit is the smallest storing space in the computer. In a computer, bit represents two states: either
“on” or “off”. It represents two numerical digits “0” and “1”.
✓ BYTE: A group of 8 bits form a byte. A computer’s capacity is measured in terms of bytes.
✓ BROWSER: A browser is a software used to access the Internet. For example, Internet Explorer, Mozilla,
Opera, etc.
✓ CENTRAL PROCESSING UNIT (CPU): It takes data in the form of input and processes the input by
some arithmetic or logical operations using ALU, transforming the data into output.
✓ COMPUTER: A computer is an electronic device that is able to execute programs written in different
languages.
Introduction to Digital Computer 19
✓ COMPILER: A compiler is a software program that converts high-level language into low-level lan-
guage understood by the processor.
✓ INTERPRETER: Just like a compiler, an interpreter also translates high-level language into low-level
machine language. It translates each instruction immediately one by one.
✓ OPERATING SYSTEM: Operating system works as an interface between the hardware and the user.
✓ PROGRAM: A program, written in programming language, is a set of instructions by which computer
comes to know what is to be done.
✓ STORAGE DEVICE: Storage devices are used to store the digital data and programs which can be ac-
cessed by the computer system.
✓ PRIMARY STORAGE: Primary storage is also known as temporary storage. It is used for storing data
and programs temporarily.
✓ SECONDARY STORAGE: Secondary storage is not constantly accessible by a computer system.
When required, secondary storage devices and media can be accessed by plugged or inserting them into
a computer.
✓ SOFTWARE: A software is a collection of programs. Computer software is used to manage the entire
file system of the computer and is also necessary for the running of computer hardware.
✓ HARDWARE: Hardware is the physical component of the computer system.
REVIEW EXERCISES
Multiple Choice Questions
1. Which was the first microcomputer?
a. Altair 8800 b. Altair 8600
c. Altair 8400 d. Altair 8000
2. Which of the following comprises Von Neumann architecture?
a. Arithmetic logic unit, control unit b. Memory, processing unit, control unit
c. Integrated Circuits, Monitor, Mouse d. Processing unit, control unit
3. Which of the following are the components of the Central Processing Unit (CPU)?
a. Control Unit, Monitor b. Arithmetic logic unit, Memory
c. Control Unit, Memory d. Arithmetic logic unit, Control Unit
4. Which storage device is permanent?
a. Tertiary b. Primary
c. Secondary d. None of the above
5. Which of the following languages is Assembly language?
a. Machine language b. Medium-level programming language
c. Low-level programming language d. High-level programming language
6. Which of the following programs can be used to convert high-level language into machine-level
language?
a. Assembler b. Compiler
c. Translator d. Interpreter
20 Problem Solving and Python Programming
Short Questions
1. What is a digital computer? What are the components of digital computer?
2. What are the characteristics of Von Neumann architecture?
3. What is the difference between primary storage and secondary storage?
4. Explain the terms hardware and software.
5. What do you mean by programming languages? What is the difference between machine language,
assembly language and high-level language?
6. What is compiler? How is compiler different from interpreter?
7. What is assembler? What are the differences between compiler and assembler?
8. What is the difference between RAM and ROM?
9. What is an operating system?
22 Problem Solving and Python Programming
not fulfilled. If your goal was to achieve 100% growth but you end up attaining only 70%, this implies that
you have not met the actual standard.
While solving a problem it is acceptable to skip a few steps if these steps are not really important. On
the basis of this key dimension, a problem can be categorised as ignorable, recoverable and irrecoverable.
Note The very first step of writing a program is to understand the problem. In order to
understand the problem, it must be thoroughly analysed.
2.2 Algorithms
In computer science and mathematics, an algorithm is a set of instructions used for solving problems in a
step-by-step manner. This step-by-step explanation of doing something is known as an algorithm.
Problem Solving Strategies 25
TIP
If an algorithm is correctly written, there are very low chances of generating a bad program.
26 Problem Solving and Python Programming
Figure 2.1
2. Input/Output: Every time you take an input from a user and return an output to the user, an input/
output symbol is used in the flow chart. The symbol that is used for both input/output-related actions is a
parallelogram as shown in Fig. 2.2.
Figure 2.2
3. Process: If you are running a processing instruction, you need to use a rectangular box in the flow chart.
This rectangular box, as shown in Fig. 2.3, is used for processing needs.
Figure 2.3
Problem Solving Strategies 27
4. Decision Symbol: In a flow chart, a decision symbol, as shown in Fig. 2.4, is used for answering questions
in the form of either true/false or yes/no. Please note that each answer can lead you to a different path in
the flow chart. A ‘yes’ to a question can take you to one path and a ‘No’ to the same question can generate
a completely new path.
Figure 2.4
5. Flow Lines: Flow lines depict the direction of a flow in a flow chart. There are four types of flow lines.
Flow lines, as shown in Fig. 2.5, can depict a left, right, top or bottom direction.
Figure 2.5
6. Connector: As the name suggests, a connector connects. It connects different steps in a flow chart that are
on different pages and gives a sense of continuation. Generally, it is used in extremely complex flow charts
and it is denoted by a small circle as shown in Fig. 2.6.
Figure 2.6
TIP
To draw a correct flow chart, it is imperative to know the function of each flow chart
symbol.
28 Problem Solving and Python Programming
Start
Yes Is it No
raining?
Stop
Figure 2.7
Start
Is the
No
statement
true?
Yes
Statement will be repeated
Stop
Figure 2.8
Problem Solving Strategies 29
Start
Perform step 1
Perform step 2
Perform step 3
Stop
Figure 2.9
Start
No
Stay at home
Stop
Figure 2.10
● Also, only one flow line should enter a decision symbol. However, two or three flow lines can leave
the same decision symbol. For example, in Fig. 2.10, decision after the question ‘do you have more
than 100 rupees?’ led to two flow lines, each representing a ‘yes’ and a ‘no’, respectively.
● Only one flow line, as shown in Fig. 2.10, is used in conjunction with a terminal symbol.
● It is important to ensure that a flow chart has a logical start and end. A flow chart can have only one
start terminal. However, it can sometimes lead to more than one terminal symbols.
● It is also important to stop a flow chart at a logical conclusion.
Author: J. C. Snaith
Language: English
LONDON
ARCHIBALD CONSTABLE & CO. Ltd.
1907
Richard Clay & Sons, Limited,
BREAD STREET HILL, E.C., AND
BUNGAY, SUFFOLK.
WILLIAM JORDAN, JUNIOR
I
It had been raining all day in London. The beating of water, cold,
monotonous and heavy upon the streets, had now acquired mystery
from the darkness of a November night. The vague forms floating
here and there through the haze of the lamps, which a few hours ago
were easy to define, were full of strangeness, while the noise of the
water as it gurgled into the sewers, and slopped from the spouts
over the dark fronts of the shops had a remote significance. Now and
again odd shapes would emerge from the curtain of the shadows: a
wet policeman, a dog, a bedraggled walker of the streets, a sullen
cabman, a lame horse. Over and above, round and about these
phantasmal appearances, was the sound of continual water falling
upon the great roar of London.
In one of the narrow purlieus leading from the City to the eastern
wilderness, night had erased the actual like a wet cloth drawn across
writing in chalk upon a board. Two rows of sopping shuttered walls
were only able to emit an occasional smear of lamplight, by which
the pageant of the individual consciousness could embody itself.
Here and there a signboard would be half-disclosed over some
deserted shop; and in the middle of a long and very dismal
thoroughfare was one that seemed to take a quality from the fact that
a faint gleam of light was stealing through a chink in the shutters of a
door. Above this door, in faded letters which the film of shadows
rendered barely visible, was the legend, “Second-hand Bookseller.” It
seemed to be centuries old. The light, however, frail as it was,
somehow appeared to make it memorable. Yet the source of this
talisman was not the shop itself, but a little room that lay behind.
This small shop in which a thousand and one volumes huddled, like
corpses in a chasm, seemed almost to form an intermediary
between the real on the one hand, and the chimerical on the other.
On its shelves, in a limbo of darkness and neglect, lay the dead, the
dying, and the imperishable. Buried in dust and decay, in covers that
could hardly hold together, were pregnant annotations upon the
human comedy. On the upper shelves were tomes whose destiny it
had been to hold back the hands of time, and had duly fulfilled it.
Below these were a thousand formulas which had proved
disconcerting to man. Still, however, as in the sodden and shadow-
fraught chimera beyond the shutters, even here darkness did not
reign inviolate. There were tiny lamps on this shelf and that: like
those in the street without the power to offer more than a flicker of
light, yet able to suggest that the blackest night is susceptible of
challenge. A candle shone here and there in the gloom, faint yet
invincible, like a will-o’-the-wisp that hops about the mounds in a
cemetery.
Opening out of the shop was a little inner room. It was from this that
the thread of light proceeded. This tiny chamber, some twelve feet by
sixteen, had little furniture. In the centre was a quaint old table. A
curious tome of yellow parchments was spread open upon it. Built
into the outer wall was a cupboard. Its heavy oak door was studded
with nails and strongly secured. In the grate the fire was bright; the
bare floor and walls were spotless; and from the low ceiling
depended a lamp in the form of a censer whose light was soft yet
clear.
The room had two occupants: a man whose hair was almost white
and a boy. Each was immersed in a book: the man in the tome
outspread on the table, whose yellow leaves, venerable binding, and
iron clasps, gave it a monastic appearance; the boy was reading in
the ancient authors.
The countenance of each was remarkable. The eyes of the man
were those which age does not darken; yet his cheeks were gaunt,
and the lines of his frame seemed to be prematurely old; but the
ample forehead and every feature was suffused with the luminosity
by which a high intelligence reflects itself. The face of the boy, pale,
gentle and mobile, was too rare to describe. His eyes, vivid in hue
and very deeply set, were bright with a kind of veiled lustre; his form
was of elfin slightness; his hands looked as frail as gossamer. Yet
the countenance, although full of the solemn wonder of childhood,
and angelic beauty, was marred by a gross physical blemish. Every
feature appeared to have been touched by the wand of a fairy, yet in
the middle of the right cheek was an open wound.
There was not a sound in the little room except the ticking of the
clock, and an occasional creak from the fire. Now and again the man
would pause in his scrutiny of the old yellow page. Uplifting the finger
which pursued every word of the faded and almost illegible writing,
he would seem to consider it with secret thoughts shaping
themselves upon his lips. Then he would smile a little and sigh faintly
and turn to it again.
Presently his gaze sought the boy. Within it was a look of
indescribable solitude, for as the boy crouched over the old volume
printed in black letter which he held upon his knees, great tears
dripped softly from his eyes. The white-haired man addressed him in
a low voice that was like a caress.
“Ah, my brave one! thou dost not fear the drama.”
The boy looked up with a startled face. He gave a little shiver.
“What is that, my father,” he asked, “that you speak of as the
drama?”
“What is that, beloved one,” asked his father, “that afflicts you with
dismay?”
The boy pressed his palms against his thin temples.
“I think—I think it is the words, my father,” he said, “the something in
the sound of the words.”
“Truly,” said his father, “the something in the sound of the words.
That which is given is taken away—the something in the sound of
the words.”
“Did you not say, my father,” said the boy, “that the drama was—was
what you call a ‘play’?”
“Yes, a play,” said his father, “a bewildering and curious play—a
haunting and strange play. It is almost terrible, and yet it is beautiful
also.”
“I don’t understand,” said the boy, his eyes growing dark with
perplexity.
His father was quick to read his distress, and a mournful compassion
came into his face. The boy left his book and came to his father’s
side. The man folded the frail and excitable form to his bosom.
“Patience, patience, agile spirit!” he exclaimed as he pressed his lips
upon the gaunt cheek upon which lay the wound.
“I must understand all things, my father,” said the boy, who was
composed a little by his father’s arms. “I—I must know something
more about the drama, for I—I must understand it all.”
“It is that which we feel,” said his father. “It is sometimes in the air. If
we listen we can hear it. I hear it now.”
The boy lifted his face with all his senses strung.
“I can only hear the ticking of the clock, my father, and the creaking
of the fire.”
“There is something else.”
The boy walked to the shutters of the little room, pressed his ear
against them, and listened with great intensity.
“There is only the gurgle of water,” he said, “and the little voice of the
wind.”
“And,” said the man with faint eyes.
“And—and! And the mighty roar of the streets of the great city.”
“That is the drama, beloved one.”
The boy sprang away from the shutters with a little cry.
“Yes, now I know,” he said excitedly. “Now I know what it is. And it
was the something in the sound of the words. That which is given is
taken away. It is what I am always dreaming about this little room of
ours. I am always dreaming, my father, that it has been taken from
us, that we have been cast out of it, that we have it no more. I have
even dreamt that we wandered all day and all night in the cold and
dreadful streets of the great city, among all those fierce and cruel
street-persons, and that they looked upon us continually with their
rude eyes. Then it is that I shiver so much in my fear that I awaken;
and I could shout with joy when I find it is ours still, and that it has all
been a dream.”
The look of compassion deepened in the man’s face.
“Dost thou never grow weary of this little room?” he said.
“Never, never, my father,” said the boy. “I can never grow weary of
this little room. I almost wish sometimes we did not venture to leave
it, lest one day we should lose our path in the great city, and not find
our way back. I sometimes think I would like to stay in it every
moment of my earth-life, so that I might read every one of those
authors in the shop. How I wish, my father, that I understood all the
hard words and all the strange tongues like you do. But at least I
understand one more very difficult word now that I know what is the
meaning of the drama.”
“That is to say, beloved one,” said his father, “now that you
understand the meaning of the drama you hold the key to many
other words that are also very difficult.”
“Yes, yes, my father—and how quickly I shall learn them!”
“You are indeed wonderful at learning.”
“Yet sometimes, my father, I hardly dare to think how much there is
to know. Sometimes when I lie by your side in the darkness, my
father, and something seems to have happened to the moon, I
almost feel that I shall never be able to know all.”
“Thou art quite resolved, my brave one, to know all?”
“Oh yes, my father,” said the boy, and his eyes grew round with
surprise at the question.
“Wherefore, beloved?”
“I must, I must!” said the boy, and his eyes grew dark with
bewilderment. “Dost thou not know, O my father——” He checked
his words of surprised explanation shyly and suddenly.
“I know,” said his father gently, “thou art one of great projects.”
“I had forgotten, O my father,” said the boy, a little timorously, “that I
had not revealed them unto you.”
“Pray do so, my beloved,” said the man softly.
The boy faltered. A shy blush overspread the pallor of his cheeks.
“I am to be one of the great ones of the earth, my father,” he said,
with the sensitive gaze of a girl.
“Truly,” said his father, with a glance of grave tenderness; “destiny
declared it so in the hour that you were born. And I doubt not you will
be called to great endeavours.”
“Oh yes, my father,” said the boy, with strange simplicity. “I am to
walk the path of heroes.”
The white-haired man averted his glance.
“It is for that reason I must be well found in knowledge, my father,”
said the boy.
“True, beloved one,” said the man through pale lips.
“And the meaning of every thing, my father,” said the boy; “bird,
beast and reptile, and the moon and stars, and why the street-
persons walk the streets of the great city; and why the earth is so
many-coloured; and why the sky is so near and yet so far off; and
why when you clutch the air there is nothing in your hand. Must not
such as I know all this, my father?”
“True.”
“And why a man has two legs, and a horse four, and a crocodile I
know not how many, and why a serpent crawls upon its belly.”
“True, true,” said his father. “But I fear, beloved one, that all this
knowledge is not to be acquired in this little room of ours. If you wish
to learn the meaning of all things, will you not have to go to school?”
A shiver passed through the boy’s frame. His face had the pallor of
great fear.
“Dost thou mean, O my father,” he said, “that I must leave this little
room of ours and go out among the street-persons in the endless
streets of the great city?”
“He who would understand the meaning of all things,” said his father,
“must certainly go to school.”
“Yet are not all things to be learned from the ancient authors, my
father?” asked the boy eagerly. “Is not every secret contained in
those hundreds of books in the shop that it is not yet given to my
mind to grasp?”
“There are many secrets, beloved, which no book has the power to
reveal.”
“Not even those among them, my father, which are wrought of the
great souls of heroes?” said the boy in dismay.
“Not even they.”
“Yet have I not heard you say, my father, that there were few things
they did not understand?”
“True, beloved, but they had not the power to commit the whole of
their knowledge to their writings.”
“But did you not say, my father, that each of these great ones
communed with his peers constantly and faithfully in his little inner
room?”
“What a prodigious memory is yours! But I ought to have made it
clear to you that before these heroes could commune with their
peers faithfully, they were compelled to leave their little rooms,
adventure out among the streets of the great city and go to school.”
“Then, my father, I also will go to school.”
The boy clasped his frail hands, and strove to conceal the abject fear
in his eyes.
“When, my brave one?”
“To-morrow I will go, my father.”
“So be it then, beloved one.”
In the silence which followed the tense breathing of the frail form
could be heard to surmount the ticking of the clock, the creaking of
the fire, the little voice of the wind, the gurgle of water, and the great
roar of London.
“Are all heroes in bitter fear, my father, when first they go to school?”
asked the boy.
“Indeed, yes.”
“Do they ever tremble like cravens, and do their eyes grow dark?”
“Yes, beloved one.”
“Have not these great ones a strange cowardice, my father?”
“Is not the cowardice of heroes the measure of their courage?”
“Can it be, O my father,” said the boy, with a deepening pallor, “that
these great ones derive their valour from their craven hearts?”
“Truly, beloved, if they learn the secret.”
“The secret, my father?”
“The secret which is only to be learned in the school which is in the
streets of the great city.”
The face of the boy grew like death. “To-morrow then, my father,” he
said in a faint and small voice, “Achilles will adventure forth to this
school which is in the streets of the great city, that he too may learn
this secret. He should have known that one like himself should not
only have great learning, wisdom and constancy, but also a noble
valour.”
“True, a thousand times! This is indeed Achilles!”
“I give you good-night, my father. Pray remember me in your vigil.”
The boy threw his arms round the man’s neck, and pressed his
cheek against him. It seemed to burn like a flame.
The boy took a candle from the chimney-piece, lighted it, and in his
great fear of the darkness, was accompanied by his father up the
stairs. When the white-haired man had enveloped the frail form in
the blankets with a woman’s tenderness, he left the light in the
chamber burning at its fullest, and returned to the little room. It was
then near to midnight.
The massive old tome in which he had been reading was open still
upon the table. He knelt before it, pressing his eyes upon the yellow
parchments. On the clock in the little room the hands made their
tardy circuit: midnight passed; one o’clock; two o’clock; three o’clock.
Throughout these hours the man remained thus, not heeding that all
about him was darkness; for the lamp and the fire had burned
themselves out long ago.
Near to the hour of four a ghostly figure, pale but luminous, crept into
the silence of the room. It was the boy, clad in a white gown and
bearing a lighted candle. He touched the kneeling figure softly.
“My father,” he breathed; “how you tremble, my father, and how cold
you are!”
The man rose to his feet with a slight shiver.
“The fire is low,” he said. “Are we not ever cold when the fire is low?”
“The fire is out, my father,” said the boy.
“Is the fire ever out, beloved,” said his father, “while one ember is still
faintly burning? May we not draw it into flame perhaps?”
The man knelt again and breathed upon the embers, so that
presently they began to glow.
“I could not rest, my father,” said the boy, “and I grew so afraid of the
loneliness that I have come to be near you. I do not think it is raining
now, but the wind is speaking bitterly. I wish the stars would shine. I
am not so craven-hearted when the stars look at me with their bright
eyes.”
“May there not be one among all those millions,” said his father, “who
knows that to be so, and shines out to comfort you? Let us look.”
With eager hands the boy helped his father to unfasten and cast
back the shutters. Through heavy masses of walls and chimney-
stacks a fragment of the void was to be seen. Across it the broken
clouds were scudding, and a single star was visible. It emerged faint
but keen and clear.
“It is Jupiter,” cried the boy in a voice of joy and excitement. “Hail,
mighty prince of the heavens! Ave, ave, great lord of the air!”
The patient white-haired figure at the boy’s side was peering also
towards the star. In his eyes shone the entrancement of many
thoughts.
II
When at last the morning brought its grey light the boy set out with
his father into the streets of the great city. Amid the dun-coloured
wilderness through which he passed, amid the labyrinth of dread
thoroughfares in which noise, dirt, and confusion seemed to contend,
he grasped his father’s hand in the fear of his heart. The rattle of
horses and carts, the mud-flinging hoofs and the cries of the drivers,
the vigour and rudeness of the street-persons by whom he was
hustled, filled him with a dire consternation. Yet beyond all that he
suffered in this way, which was no more than a little personal
inconvenience after all, was the fear, permanent, overmastering and
intense, that never would his father and he be able to retrace their
steps to that tiny refuge which they had left so lately, which now
seemed so far away that they could never hope to win their way
back. How could they hope to retrace their steps among that ever-
surging sea of streets and houses and faces and vehicles? Once as
he was submerged in a whirlpool that was formed by the meeting of
four main arteries of traffic, and was compelled to wait until a
strangely clad street-person, who wore a helmet like Minerva,
stopped, by the magic process of holding up his hand, the unending
procession of carts and horses to enable his father and himself and
a swarm of street-persons, who pressed upon his heels and trod
upon his toes, to pass to that debatable land across the way, which
looked so full already that it could not yield space for another living
soul, he held his father’s hand convulsively and said in a voice of
despair: “I feel sure, my father, we shall never win our way back to
our little room.”
In point of actual time this journey was not more than half-an-hour,
yet it formed such a highly wrought experience, that to the boy it
seemed to transcend and even to efface all that had previously
happened in the placid term of his existence. At last it came to an
end in a succession of quiet streets that led to a gloomy square,
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.
ebookmass.com