100% found this document useful (1 vote)
12 views

Building Python Programs 1st Edition Stuart Reges instant download

The document is a promotional and informational piece about the textbook 'Building Python Programs' by Stuart Reges and others, designed for introductory computer science courses. It emphasizes a procedural programming approach and includes resources for both students and instructors. The text aims to provide a thorough understanding of Python programming with a focus on problem-solving and algorithmic thinking.

Uploaded by

ohmiqfi8950
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
12 views

Building Python Programs 1st Edition Stuart Reges instant download

The document is a promotional and informational piece about the textbook 'Building Python Programs' by Stuart Reges and others, designed for introductory computer science courses. It emphasizes a procedural programming approach and includes resources for both students and instructors. The text aims to provide a thorough understanding of Python programming with a focus on problem-solving and algorithmic thinking.

Uploaded by

ohmiqfi8950
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Building Python Programs 1st Edition Stuart

Reges download

https://textbookfull.com/product/building-python-programs-1st-
edition-stuart-reges/

Download full version ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Building Java Programs: A Back to Basics Approach


Stuart Reges

https://textbookfull.com/product/building-java-programs-a-back-
to-basics-approach-stuart-reges/

Building Java Programs - A Back to Basics Approach


Stuart Reges

https://textbookfull.com/product/building-java-programs-a-back-
to-basics-approach-stuart-reges-2/

Building Java Programs: A Back to Basics Approach, 5th


Edition Stuart Reges

https://textbookfull.com/product/building-java-programs-a-back-
to-basics-approach-5th-edition-stuart-reges/

Fundamentals of Python: First Programs, 2nd Edition


Kenneth A. Lambert

https://textbookfull.com/product/fundamentals-of-python-first-
programs-2nd-edition-kenneth-a-lambert/
Building Community and Family Resilience: Research,
Policy, and Programs Mike Stout

https://textbookfull.com/product/building-community-and-family-
resilience-research-policy-and-programs-mike-stout/

Python Data Analysis: Perform data collection, data


processing, wrangling, visualization, and model
building using Python 3rd Edition Avinash Navlani

https://textbookfull.com/product/python-data-analysis-perform-
data-collection-data-processing-wrangling-visualization-and-
model-building-using-python-3rd-edition-avinash-navlani/

Choppy Water 1st Edition Stuart Woods [Woods

https://textbookfull.com/product/choppy-water-1st-edition-stuart-
woods-woods/

Dendrites 3rd Edition Greg Stuart

https://textbookfull.com/product/dendrites-3rd-edition-greg-
stuart/

The New Mechanical Philosophy 1st Edition Stuart


Glennan

https://textbookfull.com/product/the-new-mechanical-
philosophy-1st-edition-stuart-glennan/
Building Python Programs
First Edition

Stuart Reges
University of Washington
Marty Stepp
Stanford University
Allison Obourn
University of Arizona

330 Hudson Street, NY, NY 10013


Senior Vice President Courseware Portfolio Management:
Marcia Horton
Vice President, Portfolio Management: Engineering, Computer
Science & Global Editions: Julian Partridge
Executive Portfolio Manager: Matt Goldstein
Portfolio Management Assistant: Meghan Jacoby
Field Marketing Manager: Demetrius Hall
Product Marketing Manager: Yvonne Vannatta
Marketing Assistant: Jon Bryant
Managing Producer: Scott Disanno
Content Producer: Amanda Brands
Project Manager: Rose Kernan, RPK Editorial Services
Manufacturing Buyer, Higher Ed, Lake Side Communications,
Inc. (LSC): Maura Zaldivar-Garcia
Cover Design: Pearson CSC
R&P Manager: Ben Ferrini
Inventory Manager: Bruce Boundy
Cover Art: Matt Walford/Cultura/Getty Images
Full Service Vendor: Pearson CSC
Full-Service Project Management: Pearson CSC/Rose Kernan
Composition: Pearson CSC
Printer/Binder: LSC Communications, Inc

The authors and publisher of this book have used their best efforts
in preparing this book. These efforts include the development,
research, and testing of the theories and programs to determine
their effectiveness. The authors and publisher make no warranty of
any kind, expressed or implied, with regard to these programs or to
the documentation contained in this book. The authors and publisher
shall not be liable in any event for incidental or consequential
damages in connection with, or arising out of, the furnishing,
performance, or use of these programs.

Copyright © 2019 Pearson Education, Inc., Hoboken, New Jersey


07030. All rights reserved. Printed in the United States of America.
This publication is protected by copyright, and permission should be
obtained from the publisher prior to any prohibited reproduction,
storage in a retrieval system, or transmission in any form or by any
means, electronic, mechanical, photocopying, recording, or
otherwise. For information regarding permissions, request forms and
the appropriate contacts within the Pearson Education Global Rights
& Permissions department, please visit www.pearsonhighed.com/
permissions/.

Many of the designations by manufacturers and seller to distinguish


their products are claimed as trademarks. Where those designations
appear in this book, and the publisher was aware of a trademark
claim, the designations have been printed in initial caps or all caps.

Unless otherwise indicated herein, any third-party trademarks that


may appear in this work are the property of their respective owners
and any references to third-party trademarks, logos or other trade
dress are for demonstrative or descriptive purposes only. Such
references are not intended to imply any sponsorship, endorsement,
authorization, or promotion of Pearson’s products by the owners of
such marks, or any relationship between the owner and Pearson
Education, Inc. or its affiliates, authors, licensees or distributors.

Library of Congress Cataloging-in-Publication Data

Names: Reges, Stuart, author. | Stepp, Martin, author. | Obourn,


Allison, author.

Title: Building Python programs / Stuart Reges, University of


Washington, Marty Stepp, Stanford University, Allison Obourn,
University of Arizona.

Description: First edition. | New York, NY : Pearson, [2019] |


Includes index.

Identifiers: LCCN 2018028848| ISBN 9780135205983 | ISBN


0135205980

Subjects: LCSH: Python (Computer program language)

Classification: LCC QA76.73.P98 R445 2019 | DDC 005.13/3—dc23

LC record available at https://lccn.loc.gov/2018028848

1 18
ISBN 10: 0-13-520598-0

ISBN 13: 978-0-13-520598-3


Preface
The Python programming language has become enormously popular
in recent years. Many people are impressed with how quickly you
can learn Python’s simple and intuitive syntax and that has led many
users to create popular libraries. Python was designed by Guido van
Rossum who has been affectionaly dubbed “Benevolent Dictator For
Life (BDFL)” by the Python community. He has said that he chose
the name Python because he was “in a slightly irreverent mood” and
that he is “a big fan of Monty Python’s Flying Circus” (a British
comedy show). Who wouldn’t want to learn a programming language
named after a group of comedians?

Our new Building Python Programs text is designed for use in a first
course in computer science. We have class-tested it with hundreds
of undergraduates at the University of Arizona, most of whom were
not computer science majors. This textbook is based on our
previous text, Building Java Programs, now in its fourth edition. The
Java text has proven effective in our class testing with thousands of
students including our own at the University of Washington since
2007.

Introductory computer science courses have a long history at many


universities of being “killer” courses with high failure rates. But as
Douglas Adams says in The Hitchhiker’s Guide to the Galaxy, “Don’t
panic.” Students can master this material if they can learn it
gradually.

Python has many attributes that make it an appealing language for a


first computer science course. It has a simple and concise yet
powerful syntax that makes it pleasant to learn and great for writing
many common programs. A student can write their first Python
program with only a single line of code, as opposed to several lines
in most other languages such as Java or C++. Python includes a
built-in interpreter and read-evaluate-print loop (REPL) for quickly
running and testing code, encouraging students to test and explore
the language. Python also offers a rich set of libraries that students
can use for graphics, animation, math, scientific computing, games,
and much more. This text has been built from the start for Python 3,
the most modern version of the language as of this writing, and it
embraces the modern features and idioms of that version of the
language.

Our teaching materials are based on a “back to basics” approach


that focuses on procedural programming and program
decomposition. This is also called the “objects later” approach, as
opposed to the “objects early” approach taught in some schools. We
know from years of experience that a broad range of scientists,
engineers, and others can learn how to program in a procedural
manner. Once we have built a solid foundation of procedural
techniques, we turn to object-oriented programming. By the end of
the text, students will have learned about both styles of
programming.
The following are the key features of our approach and materials:

Focus on problem solving. Many textbooks focus on language


details when they introduce new constructs. We focus instead on
problem solving. What new problems can be solved with each
construct? What pitfalls are novices likely to encounter along the
way? What are the most common ways to use a new construct?
Emphasis on algorithmic thinking. Our procedural approach
allows us to emphasize algorithmic problem solving: breaking a
large problem into smaller problems, using pseudocode to refine
an algorithm, and grappling with the challenge of expressing a
large program algorithmically.
Thorough discussion of topics. The authors have found that
many introductory texts rapidly cover new syntax and concepts
and then quickly race on to the next topic. We feel that the
students who crack open their textbook are exactly the sort that
want more thorough and careful explanation and discussion of
tricky topics. In this text we favor longer explanations, with more
verbiage, figures, and code examples than in many other texts.
Layered approach. Programming involves many concepts that
are difficult to learn all at once. Teaching a novice to code is like
trying to build a house of cards; each new card has to be placed
carefully. If the process is rushed and you try to place too many
cards at once, the entire structure collapses. We teach new
concepts gradually, layer by layer, allowing students to expand
their understanding at a manageable pace.
Emphasis on good coding style. We show code that uses
proper and consistent programming style and design. All
complete programs shown in the text are thoroughly commented
and properly decomposed. Throughout the text we discuss
common idioms, good and bad style choices, and how to choose
elegant and appropriate ways to decompose and solve each new
category of problem.
Carefully chosen language subset. Rather than a “kitchen
sink” approach that tries to show the student every language
construct and feature, we instead go out of our way to explain
and use a core subset of the Python language that we feel is
most well suited to solving introductory level problems.
Case studies. We end most chapters with a significant case
study that shows students how to develop a complex program in
stages and how to test it as it is being developed. This structure
allows us to demonstrate each new programming construct in a
rich context that cannot be achieved with short code examples.

Layers and Dependencies


Many introductory computer science texts are language-oriented,
but the early chapters of our approach are layered. For example,
Python has many control structures (including loops and if/else

statements), and many texts include all of these control structures in


a single chapter. While that might make sense to someone who
already knows how to program, it can be overwhelming for a novice
who is learning how to program. We find that it is much more
effective to spread these control structures into different chapters so
that students learn one structure at a time rather than trying to learn
them all at once.

The following table shows how the layered approach works in the
first seven chapters:

Layers in Chapters 1 –7

Chapters 1 –5 are designed to be worked through in order, with


greater flexibility of study then beginning in Chapter 6 . Chapter
6 (File I/O) may be skipped, although the case study in Chapter
7 (Lists) involves reading from a file, a topic that is covered in
Chapter 6 .

The following figure represents a dependency chart for the book. A


strong dependency is drawn as a solid arrow; we recommend not
covering chapters outside of their strong dependency order. A weak
dependency is drawn as a dashed arrow. Weak dependencies are
ones where the later chapter briefly mentions a topic from the earlier
chapter, but the chapter can still be read and explored without
having covered the earlier chapter if necessary.
Chapter dependency chart

Here are more detailed explanations of the weak dependencies


between chapters:

A few examples from Chapter 7 on lists, and from Chapter


8 on dictionaries and sets, read data from files. File
input/output is covered in Chapter 6 . But overall file-reading is
not required in order to discuss lists or other collections, so
Chapter 6 can be skipped if desired.
A few examples from Chapter 11 on classes and objects
mention the concept of reference semantics, which is introduced
in Chapter 7 on lists. But the concept of references is re-
explained in Chapter 11 , so classes can be covered early
before lists if desired.
Some of the recursive functions in Chapter 9 process lists,
and one recursive function recursively reverses the lines of a file.
So Chapter 9 weakly depends on Chapter 7 . But almost
every recursive function written in Chapter 9 can be written
and understood using only the Chapter 1 –5 core material.

As you can see from the diagram, Chapter 7 on Lists is perhaps


the most important chapter after the first five, and its material is
used by many other chapters. A common chapter order swap would
be to cover Chapters 1 –5 , then do Chapter 7 on Lists, then
go back to Chapter 6 on Files with the extra knowledge of lists to
help you.

Supplements
Answers to all self-check problems appear on our web site and are
accessible to anyone: http://www.buildingpythonprograms.com/

In addition, our web site also has the following additional resources
available for students:

Online-only supplemental content


Source code and data files for all case studies and other
complete program examples.
The DrawingPanel class used in Chapter 3 .
Links to web-based programming practice tools.

Instructors can access the following resources from our web site:

PowerPoint slides suitable for lectures.


Solutions to exercises and programming projects, along with
homework specification documents for many projects.
Sample Exams and solution keys.

To access instructor resources, contact us at


[email protected]. For other questions
related to resources, contact the authors and/or your Pearson
representative.

MyLab Programming
MyLab Programming helps students fully grasp the logic, semantics,
and syntax of programming. Through practice exercises and
immediate, personalized feedback, MyLab Programming improves
the programming competence of beginning students, who often
struggle with the basic concepts and paradigms of popular high-level
programming languages. A self-study and homework tool, the
MyLab Programming course consists of hundreds of small practice
exercises organized around the structure of this textbook. For
students, the system automatically detects errors in the logic and
syntax of their code submissions and offers targeted hints that
enable students to figure out what went wrong—and why. For
instructors, a comprehensive gradebook tracks correct and incorrect
answers and stores the code inputted by students for review.

MyLab Programming is offered to users of this book in partnership


with Turing’s Craft, the makers of the CodeLab interactive
programming exercise system. For a full demonstration, to see
feedback from instructors and students, or to get started using
MyLab Programming in your course, visit: http://
www.pearson.com/mylab/programming.

Acknowledgments
We would also like to thank the staff at Pearson who helped produce
the book. Rose Kernan managed the project and was our primary
point of contact during book production. Rose did a phenomenal job;
she was diligent, responsive, and helpful at every step of the
process. Amanda Brands was our content producer, and she also
provided excellent support along the way. Thank you to Martha
McMaster for proofreading the text, and thanks to Shelly Gerger-
Knechtl for copy editing and indexing. We thank Yvonne Vannatta,
our marketing manager, and Meghan Jacoby, our editorial assistant.
We also want to thank the team of artists and compositors from
Pearson’s partner institutions who helped produce the chapters of
this text.

We would like to thank our lead editor at Pearson, Matt Goldstein.


Over a decade ago Matt believed in our work and partnered with us
to create the original Building Java Programs on which this text is
based. Matt has been a stalwart supporter and is always a pleasure
to work with.

Last but not least, the authors would like to thank the CSC 110
students at the University of Arizona who class-tested our chapters
in rough draft form. Students provided helpful suggestions for
improving the content and also submitted corrections for typos and
errors in drafts of chapters.

Stuart Reges
University of Washington
Marty Stepp
Stanford University
Allison Obourn
University of Arizona
MyLab Programming
Through the power of practice and immediate personalized
feedback, MyLab Programming™ helps students master
programming fundamentals and build computational thinking skills.

PROGRAMMING PRACTICE
With MyLab Programming, your students will gain first-hand
programming experience in an interactive online environment.

IMMEDIATE, PERSONALIZED
FEEDBACK
MyLab Programming automatically detects errors in the logic and
syntax of their code submission and offers trageted hints that
enables students to figure out what went wrong and why.

GRADUATED COMPLEXITY
MyLab Programming breaks down programming concepts into short,
understandable sequences of exercises. Within each sequence the
level and sophistication of the exercises increase gradually but
steadily.

DYNAMIC ROSTER
Students’ submissions are stored in a roster that indicates whether
the submission is correct, how many attempts were made, and the
actual code submissions from each attempt.
PEARSON eTEXT
The Pearson eText gives students access to their textbook anytime,
anywhere

STEP-BY-STEP VIDEONOTE
TUTORIALS
These step-by-step video tutorials enhance the programming
concepts presented in select Pearson textbooks.

For more information and titles available with MyLab Programming,


please visit www.pearson.com/mylab/programming

Copyright © 2018 Pearson Education, Inc. or its affiliate(s). All rights reserved. HELO88173 · 11/15
Brief Contents
Chapter 1 Introduction to Python Programming 1

Chapter 2 Data and Definite Loops 57

Chapter 3 Parameters and Graphics 132

Chapter 4 Conditional Execution 219

Chapter 5 Program Logic and Indefinite Loops 295

Chapter 6 File Processing 364

Chapter 7 Lists 418

Chapter 8 Dictionaries and Sets 517

Chapter 9 Recursion 563

Chapter 10 Searching and Sorting 636

Chapter 11 Classes and Objects 686

Chapter 12 Functional Programming 738

Appendix A Python Summary 785


Contents
Chapter 1 Introduction to Python Programming 1
1.1 Basic Computing Concepts 2
Why Programming? 2

Hardware and Software 3

The Digital Realm 4

The Process of Programming 6

Why Python? 7

The Python Programming Environment 8

1.2 And Now: Python 10


Printing Output 14

String Literals (Strings) 15

Escape Sequences 16

Printing a Complex Figure 18

Comments, Whitespace, and Readability 19

1.3 Program Errors 22


Syntax Errors 23

Logic Errors (Bugs) 25


1.4 Procedural Decomposition 26
Functions 27

Flow of Control 31

Identifiers and Keywords 34

Functions That Call Other Functions 36

An Example Runtime Error 38

1.5 Case Study: Drawing Figures 40


Structured Version 41

Final Version without Redundancy 42

Analysis of Flow of Execution 44

Chapter 2 Data and Definite Loops 57


2.1 Basic Data Concepts 58
Types 58

Expressions 59

Literals 62

Arithmetic Operators 62

Precedence 66

Mixing and Converting Types 69

2.2 Variables 70
A Program with Variables 74
Increment/Decrement Operators 79

Printing Multiple Values 80

2.3 The for Loop 83


Using a Loop Variable 87

Details about Ranges 90

String Multiplication and Printing Partial Lines 94

Nested for Loops 98

2.4 Managing Complexity 101


Scope 101

Pseudocode 103

Constants 108

2.5 Case Study: Hourglass Figure 111


Problem Decomposition and Pseudocode 112

Initial Structured Version 114

Adding a Constant 115

Chapter 3 Parameters and Graphics 132


3.1 Parameters 133
The Mechanics of Parameters 139

Limitations of Parameters 141


Multiple Parameters 145

Parameters versus Constants 148

Optional Parameters 149

3.2 Returning Values 151


The math Module 153

The random Module 156

Defining Functions That Return Values 160

Returning Multiple Values 165

3.3 Interactive Programs 167


Sample Interactive Program 170

3.4 Graphics 172


Introduction to DrawingPanel 173

Drawing Lines and Shapes 176

Colors 179

Drawing with Loops 183

Text and Fonts 186

Images 188

Procedural Decomposition with Graphics 189


3.5 Case Study: Projectile Trajectory 191
Unstructured Solution 195

Structured Solution 196

Graphical Version 199

Chapter 4 Conditional Execution 219


4.1 if/else Statements 220
Relational Operators 222

Nested if/else Statements 225

Factoring if/else Statements 231

Testing Multiple Conditions 232

4.2 Cumulative Algorithms 233


Cumulative Sum 233

Min/Max Loops 236

Cumulative Sum with if 239

Roundoff Errors 242

4.3 Functions with Conditional Execution 245


Preconditions and Postconditions 245

Raising Exceptions 246

Revisiting Return Values 250


Exploring the Variety of Random
Documents with Different Content
her dead husband brings her closer to the unknown world every
hour and every day; through suffering and darkness she knows she
is drawing closer to her beloved. My husband made my life like
bright sunshine; there were no clouds, no storms, and for the many
dear friends I made in the West I shall ever be grateful to him. His
trust, his love, his admiration for me were without compare. When I
lost him I felt that I had lost all. Women of all nations and all
countries envied me once, but now I feel that I shall have to travel
alone for the last part of my journey. Once so high I held my head,
but now the blow of widowhood has bent it low.
For a few years I felt I ought not to appear before any one or do
anything, but my darling children would not have it so.
Photo Th. Paar.
“RAJEY.”

Raj Rajendra, Narayan Bhup Bahadur, Maharajah of


Cooch Behar, 1912.
CHAPTER XIII
ANOTHER BLOW

A few days after my husband had passed away news of Rajey’s


succession to the Gadi of Cooch Behar arrived from the Government
of India. I was seated on the landing at the Porchester Gate house
when my boy came downstairs, knelt by me, clasped his hands on
my knee and sobbed. Perhaps he felt his father’s loss most at that
moment. We had a service in the evening, conducted by my cousin,
the Rev. P. L. Sen, at which Rajey’s short prayer was most
impressive.
He had all his father’s effects sealed and brought over to Cooch
Behar, and he carried out his father’s “will” to the letter.
When Rajey came out to India one of his younger aunts said to
him: “You have succeeded your father and you will be like him.”
“Like him,” was the quick reply, “that is impossible, I can never
dare hope to be like my father.”
Rajey’s attitude towards me in my widowhood was one of absolute
devotion. He referred to me in everything, although he treated me
like a child and took great care of me. He would not allow any
alterations to be made in his father’s household, and he always
answered when he was taxed with keeping too large a staff, “I
cannot dismiss any of them, they were with my father.”
His budget was kept unchanged, as he often said he would not
live to be thirty-two years of age. I tried all I could to laugh him out
of this strange idea, but it was to no purpose. Rajey’s belief was
founded on his horoscope, which ceased to say anything after thirty-
two years. Several fortune-tellers told him the same thing, that he
had not a long life written on his hand. I asked a woman palmist to
read Rajey’s hand and tell me when he would get married. She said:
“He has no marriage line on his hand.” At Dehra Dun a fortune-teller
said the same thing, and an English clairvoyant also foretold his fate
at a garden party at Calcutta. I do not think my son allowed his mind
to be influenced by these predictions. His melancholy presentiment
was due to his ill-health, for I know that he suffered more than he
allowed any one to guess.
From the moment of his accession Rajey tried to do his best for
Cooch Behar. One of his first acts was to intimate that the Dewan’s
services were no longer required. “He was never a true friend to my
father,” was his only comment when the overjoyed natives of Cooch
Behar called down blessings on his head for this display of authority.
Rajey also showed the priests that he possessed decided opinions
and meant to retain these opinions even in the face of custom and
tradition. Before the installation of a Maharajah, it was usual for the
priests to perform a Hindu ceremony known as the Abhishek. Rajey
declared the Abhishek should not take place. “I do not recognise
caste,” he said. “But it must be done,” declared the State officials.
“Who comes next to the priest in my household?” he asked. “Your
mother,” was the reply. “Then my mother shall act as my priest,” he
answered. I did the priest’s work, for my son would not hear of any
one else assisting him.
There was a complete religious ceremony according to the tenets
of the New Dispensation at the Installation, and I shall never forget
how splendidly Rajey behaved at his Durbar when the Revenue was
brought in, and he was acclaimed Maharajah by his subjects. As he
sat on his throne, he received symbolic offerings of betel leaf, attar,
and flowers. “Take them to my mother,” he commanded, and two
A.D.C.s brought to me my son’s tribute.
At the auspicious hour I was waiting on the balcony with other
zenana ladies to see the State procession pass. The elephants were
in their gala trappings. The strains of our National Anthem fell on my
ears. The troops were in brave array. Suddenly a tall young figure,
gorgeous in Raj costume, fell at my feet and paid me homage. It
was Rajey! He had actually thought of me in the supreme moment
of his life. The grandeur and pageantry were all forgotten. I was the
mother whom he delighted to honour, that was the one idea in his
mind.
At his second Durbar, while he was dressing, he suddenly looked
very grave and said: “This is my last Durbar,” and so it proved to be.
I like to recall how my son respected my prejudices. Once, when
my husband ruled, I heard that there was a vulgar show at one of
the Hindu festivals. I spoke to the Maharajah about it, and he gave
orders it should be stopped. Years after Rajey found that the show
was again going on, and he was very indignant. I heard that he
expressed a wish that “Her Highness’s orders should be carried out.”
Rajey had no favourites and always sought to do justice. Quiet
and dignified, he spoke little and gave few commands, yet all his
subjects had the deepest respect for him and tried to avoid his
displeasure. Though he was particular about Court pageantry and
dress yet his tastes were simple. How thoughtful he was, how
loving, how devoted, and yet there was always something sad about
him. He seemed more like a prince out of some old legend than a
modern young ruler.
Once I was rather annoyed with an Englishman, and remarked to
Rajey: “I don’t think I can ever forgive him; he is really
unpardonable.” Rajey looked quite sad, and said: “Oh, mother, I am
sure you don’t mean it, you don’t think it impossible to forgive any
one.”
I was never relegated to the position of Dowager, but kept up the
same state as I had done during his father’s lifetime. Rajey was
influenced by the advice of Lord Carmichael, who had always been
our best friend. “He is a godsend,” declared Rajey, and I certainly
can never be grateful enough for the help and sympathy which Lord
Carmichael always gave to me and mine.
I felt disappointed that Rajey was not given a decoration at the
Durbar. Both he and my brother-in-law, the late Maharajah of
Mourbhanj, were omitted, which I think was surprising as Rajey was
the first ruler in Bengal, and my brother-in-law was the first
territorial ruler in Orissa. If it had not been for the latter there would
have been no pageant at the show in Calcutta, and it was the
pageant which made the show such a success. Their Majesties said
it was the best show in Bengal. And Rajey deserved recognition if
ever any young ruler did; if the Government had troubled to look
into the management of our State they would have found no flaw in
its administration. How can young rulers be expected to have any
heart to work if their efforts do not meet with encouragement?
Pretty’s wedding lightened a little of our sadness at this time. My
second girl was engaged to Lionel Mander, a young Englishman who
appeared devoted to her. She was just like an English girl, although
at home she lived as an Indian Princess. I gave my consent to the
marriage, as I had long ago determined to let each of my girls marry
the man she loved, and I quite realised that, owing to caste and
creed, there would be many difficulties in the way of marriage with
any of our princes.
Rajey still seemed very ill and I felt very anxious about him. He
seldom complained, but the change in him was painfully apparent. I
sometimes begged him to marry, but his answer was always: “No,”
and once he added: “I have no marriage line on my hand.” “What
nonsense, darling!” I said. He smiled: “Where shall I put my wife?”
“My rooms are quite wasted, Rajey,” I answered. He replied:
“Mother, your rooms will never be given to another woman while I
live. They are always yours, and if ever I marry, I’ll build a new
palace. Your rooms shall never be taken away.”
Rajey went down to Calcutta for a Masonic meeting, but
developed ptomaine poisoning and became dreadfully ill. I begged
the doctor in attendance to have a consultation, but was told: “Oh,
he’ll be all right.”
I sent for Colonel Browne, but as Rajey had his family doctor (an
Englishman) with him, Colonel Browne could say little except that
Rajey had better stay in Calcutta as he was too weak to travel. The
family doctor, however, insisted on Rajey going to Cooch Behar.
Though ill and weak, he started on the trying journey. I was very
worried about him, and following him after a couple of days was told
that my darling Rajey was anxiously waiting to hear of my arrival.
The poor A.D.C. did not know for certain if I had left Calcutta and
kept on sending messages to the stations asking if I were coming.
The lives of rulers are in the hands of the doctors appointed by
the State. As Rajey was getting more and more ill every day, Jit and
Victor in despair besought Colonel Browne to see into things, as they
declared their brother’s life was in danger. It is strange that the
doctors did not think it necessary to have a consultation, but Jit
insisted on it, saying: “He is my brother and I shall have doctors
from Calcutta.” Rajey rallied and was able to entertain Lord and Lady
Carmichael at our shoot in April. They thought Rajey seemed in
better health and spirits. After our friends had left, Rajey asked what
were my plans for the summer. “You are going to England,” I said,
“let me come with you.” That pleased him. I went down to Calcutta a
few days before he did. His officers told me that the day he left
Cooch Behar the expression on his face was solemn, yet not sad,
and that when the National Anthem was played at the station, he
stood with clasped hands and eyes bent down. Perhaps he heard the
call from above in the music.
Rajey and I, accompanied by his personal staff, arrived in England
on the 1st June, 1913. It was a cold morning, and Rajey looked very
pale as he entered the special train at Dover, where we were met by
my son-in-law, Mr. Ghosal. At the station we found my three girls
and a few friends. All thought that Rajey was looking very ill,
although they did not say so at the time.
Rajey went to the Curzon Hotel with his staff and I to the Cadogan
Hotel, where I stayed with Girlie and Baby for a few weeks. I went
to see Rajey almost every day. I was much distressed to find him on
the ground floor, and near the telephone, which rang from morning
to night. I seldom got news of him. I do not know whom to blame
for this, but it made me miserable at the time.
I suppose Rajey was taken to the Derby to brighten him up. It
was a cold day and raining. The servants were so careless as to
forget to take a great-coat or any wraps, and there he caught a chill
and high fever set in. My third brother, who was Rajey’s secretary,
was anxious to take him away to 3, Palace Court. He was removed
there, and the change made him a little better. It was a nice house
and Rajey was very pleased with his rooms; but the noise was too
trying, as the traffic was constant. To the disappointment of all,
Rajey’s health did not improve.
Dr. Risien-Russell, who had been called in, begged Rajey to go to
a nursing home; he was wonderfully kind to my boy, and Rajey went
to a nursing home, where he stayed for a fortnight.
I spoke to him about taking a country house. “My days are
numbered,” he answered. “I know my time has come. Do you
remember, mother dear, how all the fortune-tellers have said I shall
not live to be thirty-two?”
Rajey returned to 3, Palace Court from Ascot. This was the
beginning of the end. Something in his face forbade me to hope, but
I tried to be brave and not let him know how much I suffered. He
often had pain which the worn-out frame could hardly endure, and
the noise of the traffic prevented much rest when the paroxysms
had passed.
He was getting thinner and thinner, and I felt that the case was
getting more serious. Still I could not give up hope. One day when
he was very ill and could hardly walk, my younger brother helped
him to sit down; Rajey put his hand on his head and said: “God
bless you, you are a good boy.” Another evening when he was very
weak, and they feared that he was sinking, he called this brother of
mine. “Bodey, sit down by me; I shall soon be starting on the last
long journey.”
He sometimes said: “Why does any one fear to die? I am not a bit
afraid to go.” My Rajey was quite ready for the long journey to the
unknown country, where he was going to meet the father he loved
so dearly. Once I asked him: “Rajey, don’t you wish to live?” He
answered: “Mother, I don’t wish to die, but if my call has come, if
God has sent for me, I shall go, and if I am to go, don’t say it is an
untimely death. I may be young, but if God sends for me you must
believe, mother, that it is a timely death.” Another day he said: “I
have only one wish, but I don’t know whether it will be fulfilled; if
only I could die in Cooch Behar.”
All sorts of kind messages were sent by our many friends. “Rajey
is to live and take care of you,” Lady Minto told me.
On the 14th August Rajey was removed to Cromer. It was the end
of his sad pilgrimage. As he was lifted out of bed he remarked to his
head chauffeur: “Davison, you’re taking me away to die.” I hid
myself in my misery, and as I looked from an upper window I saw
Rajey put into the ambulance. I had been asked to go, but I could
not as my eyes were too red and I could not hide my feelings. I
followed him to Cromer and stayed at the hotel. I used to go to
Rajey’s house, which was nice and clean and had a pretty little
garden. To my eyes Rajey did not look any better, but the doctors
thought he was getting on nicely. He had nurses who were good to
him, and I shall always be grateful to them.
Just before this Jit had come over from India, as he was going to
marry the daughter of the first Hindu Maharajah, the Gaikwar of
Baroda. They had been fond of each other for some years, but the
Princess’s parents were against the marriage because we were
Brahmos and they were Hindus. The Princess came with her parents
over to Europe, and Jit followed. It was a most romantic story, as
the young couple had seen very little of each other. Yet their love
was so strong and true that they promised each other they would
marry no one else.
On the 26th August Jit and Indira were married. The ceremonies,
civil and religious, took place at the Buckingham Palace Hotel and
the Registrar’s office. I could not help acknowledging the truth of my
father’s words that the hand of God is always manifest. In this
seemingly impossible union, beset throughout with opposition, I
again saw the triumph of the New Dispensation, for my daughter-in-
law gave up riches and caste to follow her husband, for love of him.
Indira is very clever and very pretty. She knows several languages
and has travelled a great deal; for years I had been wanting her to
be my daughter-in-law, and I was as fond of her as of my own
daughters.
I motored down to Cromer with a friend of mine, Miss Scott, and
on our return, the doctor who was attending Rajey gave me hopeful
news. He said Rajey was enjoying his food, and in three weeks’ time
would be out and about. He assured me that we could return to
India at the end of October. He even added: “I don’t see why His
Highness should not play polo again.”
On Friday I went to tea with Lady Carmichael’s brother, and after
dinner I went back again to ask how Rajey was. The doctor said he
had a little pain but not much, and he hoped he would be better the
next morning. Unfortunately Dr. Russell had to go to London for a
few days. Rajey loved him as a friend and had great faith in him.
Very early on Saturday morning a note came from the doctor
asking me to go over at once. Over my nightgown I tied on a sari
and put over all a thick coat, and in my slippers walked from the
hotel to the house with Miss Scott, who was an angel to me that
day, and stayed with me in those hours of anguish. I don’t
remember how, but I managed to get to the door of the house. In
the hall, where I met the doctor, I fell. They helped me into the
drawing-room and gave me some tea which I could not drink. The
doctor asked me if I could be brave and quiet as my son wanted to
see me. When Rajey felt the pain, the only thing he had said was:
“Nurse, I am in great pain, I want my mother.” I kept back my tears
and followed the doctor upstairs to the room where Rajey was lying.
Never shall I forget my anguish when I looked at him. His lovely
eyes were unchanged, but his voice was very faint. “Mother,” he
whispered, as I bent over him, “I am sinking … I know it.”
I too knew it, and oh! how bitter was the knowledge! “Darling,
darling,” I said, hardly able to speak. He clasped me in his arms, and
his face was close to mine. “Raj Rajendra … you know, mother …
even the King of kings must die.” The long morning passed. I was
with him the whole time. Once he said: “I’m leaving you behind,
mother.” He asked me about Jit and his wife, and also if his youngest
uncle were there.
Dr. Risien Russell and my daughter arrived late in the morning.
Rajey was pleased to see the doctor, and when he saw my youngest
brother he caught hold of his hand tight as if it were the last grip of
his friendship. I felt that if Dr. Russell had not been there, I should
have had no friend in my great trouble. He was a godsend to me.
On Sunday, at midnight, surrounded by those who were near and
dear to him, Rajey breathed his last. Thirty-one years ago this boy
had brought me every possible happiness. Now the world is dark
and gloomy, and I do not know how I shall travel the last part of my
journey, so heavy-laden am I with my grief. Rajey was not an
ordinary son to me. His birth had made every difference in my life.
The Cooch Beharis would never have been so friendly towards me
had it not been for my Rajey’s coming; neither could I have had so
happy a home had Rajey not arrived. God gave him to me and God
has taken him away. He was the most precious gift I had; but I
know, I believe that I shall meet him again in the Land of Everlasting
Happiness. These pangs of my heart will cease when I am called to
be with my two precious ones.
Rajey was dressed in his chupkan and a sacred coloured shawl
was thrown over him. Wreaths of flowers were sent by kind friends,
and his room looked no longer like a mourning room but like a
paradise.
My Rajey had put on the garment of immortality. His painful
journey was ended, and in the heaven whither his spirit had flown,
he had already been welcomed by his father, and together they
await me there.
But what remained for me? I had to suffer the long days and the
misery of the hours when sleep forsook me and grief kept a watch
by my pillow. I had to live and think that to live is sometimes the
worst torture that can be inflicted on mankind. How often have I
proved to myself the truth of those lines:

“’Tis hard to smile when one would weep,


To speak when one would silent be:
To wake when one would wish to sleep,
And wake in agony.”

Now was repeated the sad ceremonial of two years ago, when my
husband’s body was committed to the flames. Only two years and
the Ideal Ruler and the Child of Promise had both vanished from our
eyes. Surely we shall never understand the workings of Divine
Providence. All that our sad souls can do is to trust in the infinite
wisdom of God.
The blank his loss has left in my life will always be there, but he
must have gone to do a greater work, and the thought of this is the
only thing that gives me comfort.
Countless were the telegrams and letters of sympathy I received,
and the kindness of all my friends touched me very much. The late
Duchess of Connaught sent word from Bagshot: “We all deeply
sympathise with you in your great loss. We look back with pleasure
to the time when Rajey used to stay with us.”
We sent the ashes of our beloved back to Cooch Behar, and they
rest beside those of his father in the marble mausoleum which has
been built in the rose garden. This old garden is a peaceful spot.
Long ago the Maharajah learned his lessons in the ruined summer-
house which still stands on the borders of the lake, where in bygone
times the Maharanis used to bathe, and many legends are connected
with the place. The scented stillness is now unbroken save for the
music of the birds, and the mournful whisperings of the trees when
the wind speaks to them of the sleepers.
This rose garden is walled in on three sides, and from it can be
seen the snow hills far away. There are masses of roses and lilies,
and it is impossible to describe the fragrance of the flowers. Rajey
and his father are surrounded by Peace. Prayers are offered there
every evening, and sometimes the boys go there alone in the
moonlight.
My love is so strong that I think Death has opened the door of
Eternity a little way for me, and my dear ones are nearer to me than
ever. Long ago I saw the roses of youth blooming at Belghuria. Later,
the crimson flowers of love were mine, but the sweetest of all
flowers to me are those of remembrance, which shed their petals
year after year over the ashes of my dear ones who wait for me on
the radiant shore.

“Take them, O Grave! and let them be


Folded upon thy narrow shelves,
As garments of the soul laid by,
And precious only to ourselves.

“Take them, O great Eternity!


Our little life is but a gust
That bends the branches of thy tree
And trails its blossoms in the dust.”
Photo: Lafayette.
MAHARANI SUNITY DEVEE.
CHAPTER XIV
VICEROYS I HAVE KNOWN

Lord Lytton knew me as a little girl in India, but we did not meet
again until 1887 when I was visiting England. I went with my
husband to the Foreign Office party one evening. It was a grand
affair and I had a very nice dress. We were all standing in a line
waiting for the Royal procession to pass when Lord Lytton saw me.
He came and stood by me and putting his arm round my waist said:
“You have grown, and look so pretty, but so grown-up.” I felt very
uncomfortable and kept on saying: “Oh, Lord Lytton, but I am so
old. Do you know I am the mother of three children? Do please
remember that I am an old woman, over twenty.” In his kind voice
he said: “It was only the other day I saw you at your father’s school,
a little, little girl.”
Lord and Lady Ripon were very kind to us. In his time the Ilbert
Bill was passed, which made a great sensation in India and the
English spoke against the Indians and Lord Ripon. One English lady
said to me: “Why was such a man as Lord Ripon sent out to India?
he goes against his Queen.” I am sure the lady did not know what
she was saying, as Lord Ripon was a friend to India and thus served
Her Majesty the late Queen well. When my darling little Rajey had
typhoid fever in Simla in 1882 both Lord and Lady Ripon constantly
made kind inquiries and offered their doctor Anderson, a clever and
charming man.
Lord Dufferin is supposed to have been the cleverest Viceroy in
India; I was so ignorant about politics I cannot say much about his
administrative work, but I do know that he was a very kind personal
friend of mine. Lady Dufferin was the most clever and capable
Vicereine that has ever been out in India. She once came to one of
my “sari” dinners, when we all wore saris, sat on the floor, and ate
with our fingers. One of the A.D.C.s remarked that Her Excellency
looked like a goddess.
Lady Dufferin wrote a book on India in which she said a great deal
about my dear mother, whom she greatly admired. I think she was
amazed to see how cheerfully mother gave up all the comforts of life
after she lost my father. Lady Dufferin showed the greatest interest
in all my father’s institutions, and we were very proud when Lord
Dufferin presented a medal to the Victoria College. Lady Dufferin
founded the Delhi Hospital, where Indian women are trained to be
doctors and midwives. When Lady Dufferin asked me about it and if
it would be a success, I said, “Yes,” but did not quite understand
about it or realise the difficulties. It is difficult to make my Western
sisters understand about caste prejudice in my country. When Lady
Dufferin first began this training much discussion went on all over
India. To begin with, women of high caste could not do work of the
kind as they thought it lowered their position; secondly, zenana
ladies, however poor, did not wish to be trained or study with men,
therefore in the beginning only very common women took up the
medical profession, but now many advanced women have taken it
up and have studied hard and taken degrees, thus serving their
country, for which we owe much gratitude to Lady Dufferin. Lady
Wenlock told me not long ago that the idea was originally Lady
Ripon’s, but she was unable to carry it out before she left India.
Lord and Lady Lansdowne were the greatest Viceroy friends we
ever had. We all, the whole family, loved and admired them and
their children. The Maharajah was treated as a personal friend of
theirs, which made the other Maharajahs very jealous. When I was
very ill once, Lady Lansdowne used to come and see me, and they
were most kind to Rajey. Once H.H. the Begum of Bhopal gave a
strict purdah party and I was invited to meet Lady Lansdowne. I do
not quite remember, but I think the Resident wanted to know who
should sit in the next highest seat to Lady Lansdowne, and he was
informed that I was to sit next to the Viceroy’s wife, which the
Resident did not like at all. When I heard of this I thought I would
not go, but kind Lady Lansdowne on being informed of it sent I do
not know what message to the Begum’s official. Anyway the whole
tone of the letters changed, I was begged to go, and on my arrival
at the party I found that H.H. the Begum had placed Lady
Lansdowne in a chair on her right hand and I was to sit in a chair on
her left hand; these were the only seats, all the other guests came
and shook hands with the Begum while we were seated.
Lady Lansdowne was kindness itself to my children. She never
made any distinction between English and Indians at her parties,
and her tactful consideration made her very popular. I think her
charming mind was reflected in her beautiful face.
I was at my happiest in Lord Lansdowne’s reign; everything
seemed to be so bright in my life at that time, and I often think now
of that happy past. Lord Lansdowne once said: “My house is not half
large enough to hold all the people you and the Maharajah entertain
in camp.” I did appreciate those kind words.
Lord Elgin was a kind Viceroy; I don’t know whether he did much
as a statesman, but he was a very kind easy-going man. Lady Elgin
gave some very cheery children’s parties. At one of these my Jit kept
on having so much ice cream that I am sure all the A.D.C.s and
servants must have longed for us to leave the table. I went to
Calcutta once for a few hours, the Viceroy heard of it and asked me
if I would dine with them quietly; it was no party, only a family
gathering. This was a great honour. I did not think I could have a
maid with me, so I sent for a hair-dresser. He was told not to be
long, but perhaps he felt artistic that evening, for he went on
making curls and waves and using hundreds of hairpins. I was most
impatient and kept reminding him of the time, but it had no effect.
The consequence was that I was about half an hour late, a thing I
shall never forget. When I arrived, I found the two A.D.C.s in
despair, sitting on the steps watching the gate. One of them was the
late Captain Adams. I did not know how to make my excuses and
had to tell the unpleasant truth, that it was the fault of the hair-
dresser, but all they did was to pay nice compliments. I was so
nervous when I went up into the drawing-room that I felt like
running away, but when Lord and Lady Elgin came in and I made my
apologies, Lord Elgin said: “Please don’t be sorry; I am grateful to
you for being a little late. You know it is the English mail day, and
you gave me a little extra time to write a few more letters, for which
I have to thank you.” This made me forget all my troubles and only
remember what a proud and happy woman I was.
There was much splendour in the time of the Curzons, but I don’t
believe that Lord Curzon was ever really in sympathy with us. He is a
very clever man; but, may I be forgiven for my frankness, I found
him slightly interfering in private matters. He was too
unapproachable, which was most regrettable. I consider that he
missed many golden opportunities. Lady Curzon was handsome and
charming, but to my great disappointment I had neither the pleasure
nor the honour of knowing her well.
Lord Curzon did a lot of good to the country; and tried to revive
the old industries, the saris, cashmeres, etc. Also he put up tablets
on great men’s birth places and homes, which was much
appreciated; but he interfered with the future of the Indian Princes’
young sons. Whether the fathers were willing or not he did not wait
to find out, but forced them to send their boys into the Cadet Corps,
and by so doing many boys lost their opportunities of learning
administrative work. Of course, we had to submit because no one
wishes to be in the Viceroy’s bad books.
Photo: Johnston & Hoffmann.
WOODLANDS.

Lord and Lady Minto we admired and liked very much. Lord Minto
was so kind a friend that although he was Viceroy he helped a
zemindar at the cost of much trouble to himself. Lady Minto was the
first to ask the purdah ladies to Government House. She gave parties
for them regularly every year while she was in Calcutta and the
ladies enjoyed them enormously. I remember a Hindu lady
remarking of Lady Minto: “I do like her smile so.” My sister and the
Maharani of Burdwan and I joined together and gave three parties to
Lady Minto at Woodlands, and I got up some tableaux which both
the English and Indian ladies enjoyed. On one occasion I dressed
Lady Minto in a Bengali bridal dress, scarlet and gold, and she
looked lovely. Lady Minto told me afterwards that when she returned
to Government House she sent a message to the military secretary
that a Maharani was waiting in the hall, and when he came and
found Lady Minto in the bridal dress for a moment he thought it
really was a Maharani.
I remember a Bengali gentleman of high position telling us once:
“Lord Minto is a thorough gentleman; when I and my friend went to
call on him he was so nice and made us feel quite at home. What
struck us most was that at the close of the visit, when we were
going away, Lord Minto, instead of calling an orderly or an A.D.C.,
walked up to the door and opened it himself. We felt uncomfortable,
but it was a gentlemanly action; by opening the door he lost
nothing, and we gained so much.”
I feel it my duty to allude to something that happened in Lord
Minto’s reign. A rumour was circulated that a most loyal British
subject was disloyal to the Government. I was horrified when I
heard the lie; it reached the highest circles. Even Sir O’Moore
Creagh, then Commander-in-Chief, may have credited it. Perhaps it
was some fellow-countryman who started this unpardonable lie; but
how could the Government believe such an impossible thing? I only
hope that whoever did this great wrong will confess his wickedness
before he leaves this world.
Lord Hardinge did a lot of good to many people, but he was never
very kindly disposed to the Cooch Behar Raj family. Soon after I lost
my husband we came back to India, and as I had received nothing
but kindness from the Royal Family and from so many Viceroys, I
expected that Lord Hardinge as Viceroy would be kind to me. But on
the contrary he did not seem to take any trouble to be kind to my
son. When our present King was at the Delhi Durbar Lord Hardinge
paid many visits to the other Maharajahs, but never thought of
leaving his card on the Maharajah of Cooch Behar, which was not
only an insult to the Maharajah but to the whole of Bengal. Lord
Hardinge also interfered with our private affairs, at which I was
surprised because we liked him and thought him clever and never
opposed him.
Here I might mention that at this Delhi Durbar a certain Political
Officer visited the Maharajah’s camp in ordinary lounge clothes, a
thing which even H.M. the King would not think of doing. Such
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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like