The Absolute Beginner's Guide to Python Programming: A Step-by-Step Guide with Examples and Lab Exercises 1st Edition Kevin Wilson pdf download
The Absolute Beginner's Guide to Python Programming: A Step-by-Step Guide with Examples and Lab Exercises 1st Edition Kevin Wilson pdf download
https://ebookmeta.com/product/the-absolute-beginners-guide-to-
html-and-css-a-step-by-step-guide-with-examples-and-lab-
exercises-1st-edition-kevin-wilson/
https://ebookmeta.com/product/the-absolute-beginners-guide-to-
python-programming-incomplete-1st-edition-kevin-wilson/
https://ebookmeta.com/product/python-games-from-zero-to-
proficiency-beginner-a-step-by-step-guide-to-coding-your-first-
game-with-python-1st-edition-patrick-felicia/
https://ebookmeta.com/product/logic-and-language-models-for-
computer-science-fourth-edition-dana-richards/
Revelation Chapter 4 5 illustration 1st Edition Nelson
Owusu
https://ebookmeta.com/product/revelation-
chapter-4-5-illustration-1st-edition-nelson-owusu/
https://ebookmeta.com/product/the-christmas-entanglement-curves-
for-christmas-2-1st-edition-kat-obie/
https://ebookmeta.com/product/fantastic-lives-college-bound-amy-
k-hooper/
https://ebookmeta.com/product/the-far-far-better-thing-saga-of-
the-redeemed-4-1st-edition-auston-habershaw/
https://ebookmeta.com/product/campaigns-and-elections-fourth-
edition-john-sides/
Magically Fated 1st Edition Milly Taiden Kala Aster
https://ebookmeta.com/product/magically-fated-1st-edition-milly-
taiden-kala-aster/
The Absolute
Beginner’s
Guide to Python
Programming
A Step-by-Step Guide with Examples
and Lab Exercises
—
Kevin Wilson
The Absolute
Beginner’s Guide to
Python Programming
A Step-by-Step Guide
with Examples and Lab
Exercises
Kevin Wilson
The Absolute Beginner’s Guide to Python Programming: A Step-by-Step
Guide with Examples and Lab Exercises
Kevin Wilson
London, UK
Introduction����������������������������������������������������������������������������������������xv
iii
Table of Contents
Output������������������������������������������������������������������������������������������������������������21
Escape Characters�����������������������������������������������������������������������������������������21
Writing a Program�����������������������������������������������������������������������������������������������22
Lab Exercises������������������������������������������������������������������������������������������������������29
Summary������������������������������������������������������������������������������������������������������������30
iv
Table of Contents
Bitwise Operators�����������������������������������������������������������������������������������������������45
Lab Exercises������������������������������������������������������������������������������������������������������45
Summary������������������������������������������������������������������������������������������������������������46
v
Table of Contents
vi
Table of Contents
vii
Table of Contents
Shapes��������������������������������������������������������������������������������������������������������������155
Basic Animation������������������������������������������������������������������������������������������������156
Summary����������������������������������������������������������������������������������������������������������164
viii
Table of Contents
F or Loop������������������������������������������������������������������������������������������������������������187
L oop Control������������������������������������������������������������������������������������������������������187
M
odules������������������������������������������������������������������������������������������������������������187
B
uilt-In Functions����������������������������������������������������������������������������������������������187
D
eclare a Class�������������������������������������������������������������������������������������������������188
C
hild Class��������������������������������������������������������������������������������������������������������188
C
reate Object����������������������������������������������������������������������������������������������������188
C
all Object Method��������������������������������������������������������������������������������������������188
A
ccess Object Attributes�����������������������������������������������������������������������������������188
E xceptions���������������������������������������������������������������������������������������������������������188
Index�������������������������������������������������������������������������������������������������189
ix
About the Author
With over 20 years’ experience in the computer industry, Kevin Wilson
has made a career out of technology and showing others how to use it.
After earning a master’s degree in computer science, software engineering,
and multimedia systems, Kevin has held various positions in the IT
industry including graphic and web design, digital film and photography,
programming and software engineering, developing and managing
corporate networks, building computer systems, and IT support. He
currently teaches computer science at college and works as an IT trainer in
England while researching for his Ph.D.
xi
About the Technical Reviewer
Joos Korstanje is a data scientist, with over
five years of industry experience in developing
machine-learning tools. He has a double M.Sc.
in applied data science and environmental
science and has extensive experience working
with geodata use cases. He currently works at
Disneyland Paris, where he develops machine
learning for a variety of tools. His project
experience includes forecasting, recommender
engines, optimization, machine learning on
GPS tracking data, and more. Joos is also an active blogger on Medium and
has worked on multiple book publications.
xiii
Introduction
The aim of this book is to provide a first course in the use of Python to
develop programs.
It provides a foundation for those who wish to write computer
programs based on sound programming principles, and because the book
is intended to be a primer, it allows the beginner to become comfortable
with basic programming tasks.
As it is a first course, no previous experience of computer
programming is assumed.
Throughout the book, we’ll explore the Python programming language
with worked examples and lab exercises for you to complete yourself.
For this purpose, we’ve included all the source code for this book in the
following repository: github.com/apress/absolute-beginners-guide-python
xv
CHAPTER 1
Introduction to
Computer
Programming
What is a computer program? A computer is a device that processes
instructions to achieve a task. This set of instructions is called a computer
program.
A computer program usually takes some data such as a string or a
number and performs calculations to produce results. We usually refer to
the data as the program’s input and the results as the program’s output.
To write computer programs, we use a computer programming
language. There are many different languages such as BASIC, C, C++,
and Python. In this guide, we are going to concentrate on the Python
programming language.
Every computer program manipulates data to produce a result, so
most languages allow the programmer to choose names for each item of
data. These items are called variables or constants. A variable, as the name
suggests, is an item that can contain different values as the program is
executed. A constant stays the same.
What Is Python
Python is a high-level language developed by Guido van Rossum in the
late 1980s and is used in web development, scientific applications, gaming,
AI, and is well suited to education for teaching computer programming.
Python is designed to be an easily readable language. Therefore, it uses
an uncluttered formatting style and often uses English keywords where
other languages use a symbol.
Python is an interpreted programming language, meaning Python
programs are written in a text editor and then put through a Python
interpreter to be executed.
Python is used in the field of artificial intelligence and can be found
in many day-to-day applications. Streaming services such as Spotify use
Python for data analysis, particularly users’ listening habits in order to
offer suggestions on which artist to follow, other music a particular user
might be interested in, and so on. Python is also used within Netflix’s
machine-learning algorithms for recommending relevant content to users,
monitoring browsing habits, and marketing.
2
Another Random Scribd Document
with Unrelated Content
It did not take him long to find out. The humming and buzzing
inside the ball increased, and then out of one end appeared Mr.
Yellow Jacket and his wife and all their children. The ball was a
hornet’s nest, and the irate family were pouring out of their home
pell-mell.
Bumper felt a sharp sting on the end of his ear, a sting like the
pricking of a thousand needles, and another on the tip of his nose.
With that he gave a squeal of pain, and threw the ball far from him.
The next he scampered away after the others, pursued by a dozen
angry Yellow Jackets.
It was not until they were at a safe distance that they stopped.
Then Spotted Tail turned to Bumper, and said:
“What an idiot you were! Or didn’t you know it was Mr. Yellow
Jacket’s home?”
Bumper was on the point of confessing his ignorance when he
thought of the consequence. A king should know everything, and to
admit he didn’t know a hornet’s nest from a ball would be a terrible
blow to his pride. So he suppressed the groan that the pain on his ear
and nose caused, and said indignantly:
“Know it was Mr. Yellow Jacket’s home! Why, what an idea! But
somebody had to pull it down, or Fuzzy Wuzz and the children might
get stung. It was better that I should suffer than they, wasn’t it?”
Which speech they all applauded, and said that Bumper was as
brave as he was wise.
STORY III
BUMPER SAVES FUZZY WUZZ FROM
SNAKE.
You can imagine how grateful Fuzzy Wuzz was to Bumper for
saving her from Killer the Snake! Not only that, but she was mightily
impressed by his wisdom. Who but a king would have thought of
gnawing off the butt of the tree so it would fall on Killer!
She was so grateful that she told the story again and again to her
people, and they seemed as greatly impressed as Fuzzy Wuzz at
Bumper’s shrewdness. But Spotted Tail was not pleased. Perhaps he
was still suspicious, and thought it was more luck than knowledge
that had saved Bumper’s reputation. He still believed that Bumper
had never seen a hornet’s nest until that day he innocently mistook
Mr. Yellow Jacket’s home for a big, harmless ball.
This fact, coupled with several other little things that he had
observed, Bumper’s avoidance of certain plants, for instance, that he
seemed to think might be poisonous until the others ate them,
convinced him that Bumper was not fit to be the leader of his people.
“If Old Blind Rabbit could see with his eyes,” he reasoned, “he’d
know, too. But some day I’ll catch him, and show him up. He’s no
king, for a king should know everything.”
By letting such things dwell upon his mind, Spotted Tail worked
himself up into a pitch of excitement that was not pleasant. He
fancied himself wronged by Bumper. If the white rabbit hadn’t come
into the woods, Spotted Tail would have been chosen the natural
leader.
Jealousy and spite are enough to sour any disposition, and Spotted
Tail was in a fair way of showing that he was not really fitted to be a
leader. A good leader never grows sullen and discontented because
somebody else happens to get more favors than he. Fuzzy Wuzz’s
attachment to Bumper further increased Spotted Tail’s displeasure.
In time he came almost to hating Bumper, and tried to think of ways
and means to disgrace him before the others.
Bumper was only partly conscious of this feeling toward him. He
knew that Spotted Tail was suspicious of his knowledge of wood lore,
and he was on his guard all the time to prevent any mistake that
would give him away. But he never dreamed that the big rabbit was
beginning to dislike him. He seldom hunted with him, and had few
words with him, but there had been no open enmity between them.
Then one day in the woods Bumper found himself unexpectedly
separated from the others, with only Spotted Tail in view. Fuzzy
Wuzz and the rest had crossed the brook on a natural rustic bridge of
logs, and were feeding on the opposite side when Bumper discovered
them.
“Hello!” he exclaimed. “How’d they get across there? Surely, they
didn’t jump that distance.”
Spotted Tail, to whom this was addressed, replied:
“You should know by this time that a rabbit never jumps a stream
that he can get across any other way.”
Bumper nodded and smiled. “Still, I don’t see how else they got
across.”
Spotted Tail said indifferently:
“Oh, I suppose they crossed on Mr. Beaver’s house.”
This remark caused Bumper to reflect. He had heard of Mr.
Beaver, but he wasn’t sure just what kind of an animal he was. And
his house was more of a mystery to him than anything else.
“On Mr. Beaver’s house?” he asked, before thinking. “Oh, you
mean—”
He stopped in confusion, and Spotted Tail smiled gleefully.
“You mean what?” he asked, his eyes twinkling wickedly. “Don’t
you know what kind of a house Mr. Beaver builds?”
“Why, what a question?” laughed Bumper, trying to evade a direct
answer.
“I think it’s a very natural question,” added Spotted Tail. “I don’t
believe you ever saw Mr. Beaver or his house.”
Bumper laughed heartily at this, but it was a laugh to conceal his
embarrassment and not an expression of his enjoyment.
“Ho! Ho! You can be very comical if you want to!” he said. “Now
maybe you can describe what sort of a house Mr. Beaver builds. Let
me see if you can.”
But Spotted Tail felt he had Bumper in a corner, and he wasn’t to
be bluffed. “I could describe it,” he said, leering, “but I don’t have to.
If you have any eyes in your head you can see for yourself what it is
like.”
“How’s that?” asked Bumper, growing more uncomfortable.
“Just what I said,” was the quick rejoinder. “We’ve been standing
near it for some time, and you can see it with your own eyes—if you
know where to look for it.”
“Oh! Ho!” laughed Bumper, less joyously than before. “Mr.
Beaver’s house is in plain sight, is it? Well, then, neither one of us
will have to describe it.”
“No, but where is it?” pursued Spotted Tail relentlessly.
Now Bumper was in a terrible quandary. There was nothing in
view that looked like a house. So he cast a glance up at the trees,
hoping to find it among the branches, and then back through the
thick, tangled bushes. There was nothing in sight that suggested the
home of any animal.
All the time his eyes were searching around for some evidence of
Mr. Beaver’s house, Spotted Tail was watching him with an exultant
grin on his face.
“Ah! I thought so,” he said finally, with a triumphant grin on his
face. “You don’t know what kind of a house Mr. Beaver builds. You
don’t even know where he builds it. You’ve been looking for it up
among the trees, and back in the woods. Ho! Ho! And you call
yourself a leader—the king of the rabbits! Why, you don’t know
anything about the woods.”
Bumper felt he was cornered, and he was mighty glad the others
were not present to witness his discomfit.
“Now, if you’re king, show me where Mr. Beaver’s house is, and
where he builds it!” continued Spotted Tail. “If you can’t I’ll go back
and tell all the others you’re an ignorant impostor. You’re no king!
You don’t know anything about the woods or its people. A king
indeed!”
There was such scorn and contempt in the voice that Bumper
winced. He realized for the first time that he had an enemy in
Spotted Tail. There was no other excuse for his words and actions.
“Spotted Tail,” Bumper began in an injured voice, “why do you
dislike me, and try to offend me?”
“Don’t give me any such talk,” rudely interrupted the other. “I see
through it all. You’re trying to avoid the question. Answer me!
Where’s Mr. Beaver’s house? If you don’t know, confess your
ignorance.”
Bumper’s wits failed him for the first time. He saw no way out of
the corner. Spotted Tail had him, and the disgrace of confession was
horribly mortifying.
A sudden splash in the water attracted his attention. A big rat-like
animal was swimming toward the shore, with only his head and
muzzle above the surface. Bumper watched him in fascination. When
he reached the shore, he crawled upon it, and said quite angrily:
“I wish, Mr. Spotted Tail, your people would stop crawling across
the roof of my house. It annoys me very much. I was fast asleep when
they thumped over it.”
Spotted Tail was deeply upset by this interruption, and Bumper’s
wits, coming to his rescue, made him smile. Speaking at a venture, he
addressed the rat-like animal.
“I’ll ask them not to do it again, Mr. Beaver. Of course, it is very
annoying to be disturbed when asleep by people climbing over the
roof of your house.”
“Thank you!” replied Mr. Beaver, dipping into the water and
swimming back to his dam. Bumper pointed to the dam across the
stream, and said to Spotted Tail: “There’s Mr. Beaver’s house.”
STORY V
A TEST OF FLEETNESS
Confident that he had Bumper cornered, and that nothing but the
timely appearance of Mr. Beaver had saved him from disgraceful
confession, Spotted Tail returned to the burrow in an angry mood.
He had not stopped even to look when Bumper triumphantly pointed
out the beaver dam. He had hoped to be able to tell the others how
Bumper was ignorant of such a common thing as a beaver’s dam, and
now he had nothing but an empty triumph. Mr. Beaver had spoilt
everything for him—that and Bumper’s ready wit.
But he was all the more determined to show him up. He began to
brag about his knowledge of woodcraft, telling many stories of his
shrewdness and skill. Bumper remained quiet, and listened with the
others.
Spotted Tail then switched to another subject. “But it takes more
than knowledge and skill to be a good leader,” he said. “One must be
as swift as the wind as well as wise as the owl.”
He stopped suddenly and turned to the white rabbit. “A king ought
to be the swiftest runner of his people, Bumper. Don’t you think so?”
“Yes, I suppose he should be, if—”
“Then are you the fleetest runner in the woods?” interrupted
Spotted Tail.
“Why, I’ve never tried it. I’m sure I don’t know,” Bumper
stammered.
Spotted Tail, sure of his fleetness of foot, decided to challenge him
to a race. Nothing would humiliate Bumper more than to be defeated
in a speed trial.
“A king should not only be the swiftest and wisest of his people,”
he said slowly, “but there should be no doubt in his own mind of it.”
“A king doesn’t always tell what’s in his mind,” replied Bumper.
“No, but he should prove his skill and ability when challenged,”
was the quick retort.
“I didn’t know that I was challenged,” replied Bumper, in a weak
voice.
Spotted Tail smiled wickedly. “But you are, Bumper. I, Spotted
Tail, the swiftest and strongest rabbit in the woods, and the wisest,
challenge you to run a race with me. Are you afraid?”
Spotted Tail’s friends immediately clapped their paws and nodded
their heads. Fuzzy Wuzz and the other followers of Bumper looked a
little worried, but their faith in their white leader came to their
rescue.
“Yes, yes,” they said in a breath, “Bumper will race Spotted Tail,
and prove to him that he is no longer the swiftest and strongest
rabbit of the woods.”
“Of course! Of course!” echoed Spotted Tail’s friends. “There will
be a race—a fair race—and a long race. We will all turn out to see it.”
Bumper’s heart began to quake. Spotted Tail had long, powerful
legs and he could use them to good purpose. He was cut out for a
fleet runner, and Bumper had no illusions on that point. His life in
the city had never given him a chance to train for long running, and
his muscles had never been fully developed. He had his misgivings
about his speed when compared with that of this big, powerful wild
cousin of his.
Yet, as he recalled the wild flight he had made when pursued by
the bats in the sewer, and of his subsequent race with Mr. Fox in the
woods, a smile crept into his face. He had certainly run fast on those
two occasions.
“Fear makes a rabbit run faster than anything else,” he
remembered hearing the Old Blind Rabbit remark one day.
“I wish then,” Bumper said to himself, “if I must race with Spotted
Tail I’d get a good fright. Maybe I would beat him then.”
There was no way out of the challenge. Spotted Tail had made it,
and all the others, including friends and foes, had taken it up.
Bumper could not withdraw without disgracing himself.
The test of speed was to be one of endurance as well as of fleetness
of foot. It was arranged to run a mile straight out to Mr. Beaver’s
dam, and back again. A committee of four were to wait for them at
the dam to see that each contestant rounded the point. This would
prevent any trick on the part of either one.
Bumper realized right away that it was speed and endurance that
would tell. Wit and wisdom would have nothing to do with the
decision. Spotted Tail really had the advantage, for he was more
familiar with the trails and by-paths so that he could seek out the
best in going and coming.
Nevertheless, Bumper put up a brave front, and entered the race
with the determination to do his best. They started from the burrow
on even terms, and shot through the bushes at a tremendous speed.
For a time they kept abreast within sight of each other. Then they
became separated, for Spotted Tail veered off to the right to follow an
easier trail.
Bumper had great difficulty in getting to the beaver’s dam, for
twice he got lost in the bushes, and had hard work finding the trail
again. He lost so much by this that when he reached the dam, he was
not surprised to hear his friends shout:
“Hurry! Hurry, Bumper! Spotted Tail’s on his way back!”
The first half of the race was lost to him; but he could not refrain
from calling back to his friends: “The race is never decided until it’s
finished.”
Fuzzy Wuzz and the others clapped their hands at this confident
remark. Instead of losing faith in him they were more certain than
ever that Bumper would win.
Well, it didn’t look so to Bumper. He felt that he could never
overtake Spotted Tail and beat him to the finish. He might be a
quarter of a mile ahead of him, and running like the wind. The
disheartening effect of being beaten to the first stake told on his
speed, and he ran only half-heartedly.
Then suddenly out of the bushes on his right sprang something red
and flashing. Bumper caught sight of it, and his heart gave a great
bound of fear. It was Mr. Fox!
Bumper’s fright was so great that he sprang over a clump of bushes
that he never thought he could clear. Then, with his heart in his
mouth, he ran for dear life. The Old Blind Rabbit’s wise remark that
“fear makes a rabbit run faster than anything else” never occurred to
him. He was too frightened to think of anything. But, oh, how he ran!
His feet barely touched the ground. He seemed to be flying rather
than running. Never—not even when the Bats pursued him—had he
run so fast.
And the fox kept close behind him, gaining a few steps now and
then, but losing whenever Bumper took one of his wild leaps. It was a
terrible race, in which death or life was the stake. If he weakened or
faltered an instant, those red, dripping jaws would have him.
When Bumper came within sight of the burrow near the big rock,
he could see the rabbits waiting for the end of the race. They were
talking and chatting among themselves. Spotted Tail was not in
sight. Perhaps he had already finished.
“Scatter! Scatter for your life!” called Bumper, as he took a wild
leap in the air.
“It’s Bumper!” some one cried. Then they caught sight of the red
streak in pursuit. “Mr. Fox is after him! Run for the burrow!”
They scampered for shelter just as Bumper cleared the starting line
and eluded the fox by a narrow margin. Once inside the burrow, he
asked: “Where’s Spotted Tail?”
“He hasn’t come yet. You won the race, Bumper!”
And later, when Spotted Tail appeared, he was in a crestfallen
mood, for when the race was apparently won by him he had been
frightened off the trail by the sudden appearance of Mr. Fox. Instead
of running straight ahead, he had dodged into the bushes to hide.
“When you’re racing,” remarked Bumper, “you don’t want to turn
aside for anything—not even to save your hide.”
STORY VI
A TEST OF COURAGE
Of course, Bumper knew nothing about the revolt that Spotted Tail
had stirred up in the woods against him. After all, he felt a little
sympathy for Spotted Tail when all the others began to ignore him
and give him the cold shoulder. But really there was nothing he could
do, for Spotted Tail had brought the trouble all on himself because of
his envy and spite.
“Being a king isn’t all lettuce and carrots,” sighed Bumper. “I’m not
sure but I’d rather be just Fuzzy Wuzz, who smiles and laughs all day,
or even Goggle Eyes, who eats altogether too much for himself, but
seems to enjoy it.”
“Then there’s so much a king has to know,” he added a moment
later. “I’m learning all the time new things, but what I don’t know yet
frightens me. I wish sometimes I could take a vacation, and just go
off and forget everything. I wonder why kings don’t have vacations.”
Such a thing as a vacation for a king was unheard of, although all
of the rest could take any day they chose. Bumper couldn’t even steal
out of the burrow alone for a little run without somebody going with
him. The king had to be watched and accompanied all the time.
Now Old Blind Rabbit, in proclaiming Bumper the White Rabbit
king, had thought first of only his own family, for he had no control
over the other burrows; but he was so well known for his wisdom and
age that the leaders of other burrows would listen to his words. He
had wanted to keep Bumper’s coming a secret until he was sure that
he had made no mistake in choosing him.
But now he thought was a good time to take him around to his
friends—Brindley the Lame, Pink Nose, Rolly Polly and Crooked
Ears. He wanted them to meet Bumper and judge for themselves. As
leaders of their families, they knew the prophecy of the coming of a
white rabbit, who some day would rule over all their people and
redeem them from their weak ways.
“Bumper, my days are numbered, but yours are as many as the
trees in the woods,” he said to the White Rabbit. “Before I go I want
to see you accepted as king by Pink Nose, Rolly Polly, Crooked Ears,
Brindley the Lame and White Tail. Then I can die in peace.”
Bumper nodded his head, and asked who all these important
people were.
“They are leaders of big families here in the woods, and very
influential. If they accept you all the other rabbits will follow.”
“And if they don’t?”
“Then I fear there will be trouble. You cannot rule over a divided
people and make them happy.”
This bit of wisdom could not be disputed, and Bumper added
sadly: “Neither can the ruler be happy.”
“Well said, Bumper. But the time has come now when we must call
on them. I shall take you in person, and explain to White Tail and the
others the meaning of our call.”
This idea rather frightened Bumper. To meet so many important
leaders, and carry himself as a king should, made him feel like
quitting. Just for an instant he thought of the red-headed girl and her
wonderful garden, and wished he was back with her. How delightful
it would be to do nothing all day long but eat and receive her petting!
He even thought he might be happier with the old woman back in the
city.
But only for an instant did his thoughts thus play truant. He was a
king now, with duties to perform, and he wasn’t going to prove
unequal to them. Bumper had very fine qualities, which, after all,
fitted him for a ruler more than his pink eyes and white fur.
Goodness and wisdom were better than fine clothes.
Bumper had been learning rapidly the ways of his people in the
woods, and he was quite familiar with many things that had before
startled him. He had learned to know the difference between the
good and bad plants, so there was no longer any danger of his
poisoning himself. He had met Washer the Raccoon, and had made
the acquaintance of Sleepy the Opossum. He was on good speaking
terms with Mr. Beaver, and Billy the Mink had put himself out to
compare his fur with his own beautiful coat.
He knew every trail in the woods, and could scent Mr. Fox from
afar. He had even learned to swim, which he considered necessary
for his health. The birds were his friends, and he had learned much
from them. Frequently they brought him news which guided him in
his work.
A few days after the Old Blind Rabbit had announced his intention
of introducing Bumper to White Tail and the others, Rusty the Black
Bird appeared near the burrow, and perched himself on the top of
the rock until the white rabbit appeared.
“Hello, Bumper!” he called.
“Good-morning, Rusty!” replied Bumper. “It’s a long time since
I’ve seen you.”
“If you’d arrange to see me oftener,” was the retort, “you wouldn’t
get in so much trouble.”
“Thank you, Rusty, but I didn’t know I was in trouble.”
“Huh!” whistled Rusty. “Some people don’t know when they are in
trouble.”
“Then it shouldn’t bother them,” laughed Bumper. “If you don’t
know you have any trouble, why worry?”
“That may be good enough for a king, but it would never do for
common people. We must be hunting for trouble all the time to avoid
it.”
“If you hunt for it you’ll generally find it. No, I don’t believe in
looking for what you don’t want.”
Rusty was a little provoked at what he took as a personal rebuke,
and was half inclined to fly away; but Bumper’s smile changed his
mind.
“Just to show you that trouble comes whether you hunt for it or
not, I’m going to tell you something,” he added. “You’re going to be
in a peck of trouble soon, Bumper.”
“That’s much better than being in a bushel, isn’t it?” he laughed.
“Oh, stop your joking, and be serious. This is a serious matter for
you.”
“All right, I’m listening.”
“Well, then, Spotted Tail has been spreading false rumors about
you. He asked me to carry the message, but I refused, and he asked
Mr. Woodpecker and Towhee the Chewink. They told me so. But they
wouldn’t listen to him.”
“I’m very grateful for that, and you can tell Towhee and Mr.
Woodpecker so. But if nobody carried the news how did it get
abroad?”
“Mr. Shrike the Butcher Bird carried it just because we wouldn’t.
And after telling all the rabbits he told the news to Mr. Fox and
Buster the Bear.”
“What is the news he told?” asked Bumper, gravely.
In a few words Rusty told him, and when he was through Bumper
was graver than before. It pained him to think that Spotted Tail
would betray him, and it made him sad to believe that his words
could stir up discord among the rabbits.
“Thank you, Rusty,” he said in conclusion. “I’m glad to know it.
Forewarned is forearmed.”
“Oh! Ho!” laughed Rusty. “Now you begin to change your mind
about trouble. But you don’t have to hunt for it. It’s coming soon. It’s
here now!”
STORY XI
THE RABBITS RISE AGAINST BUMPER