100% found this document useful (7 votes)
13 views

Full Download (Ebook) Learn Python Programming: Write code from scratch in a clear & concise way, with a complete basic course. From beginners to intermediate, an hands-on project with examples, to follow step by step by William Gray ISBN 9781098525729, 1098525728 PDF DOCX

The document promotes various eBooks available for download on ebooknice.com, focusing on programming, particularly Python. It highlights a specific eBook titled 'Learn Python Programming' by William Gray, which offers a comprehensive course from beginner to intermediate levels. The document also includes a table of contents and details about the Python programming language's history and features.

Uploaded by

mdayimezes
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (7 votes)
13 views

Full Download (Ebook) Learn Python Programming: Write code from scratch in a clear & concise way, with a complete basic course. From beginners to intermediate, an hands-on project with examples, to follow step by step by William Gray ISBN 9781098525729, 1098525728 PDF DOCX

The document promotes various eBooks available for download on ebooknice.com, focusing on programming, particularly Python. It highlights a specific eBook titled 'Learn Python Programming' by William Gray, which offers a comprehensive course from beginner to intermediate levels. The document also includes a table of contents and details about the Python programming language's history and features.

Uploaded by

mdayimezes
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Download Full Version ebook - Visit ebooknice.

com

(Ebook) Learn Python Programming: Write code from


scratch in a clear & concise way, with a complete
basic course. From beginners to intermediate, an
hands-on project with examples, to follow step by
step by William Gray ISBN 9781098525729,
https://ebooknice.com/product/learn-python-programming-
1098525728
write-code-from-scratch-in-a-clear-concise-way-with-a-
complete-basic-course-from-beginners-to-intermediate-an-
hands-on-project-with-examples-to-follow-step-by-
step-10004410

Click the button below to download

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason;


Viles, James ISBN 9781459699816, 9781743365571,
9781925268492, 1459699815, 1743365578, 1925268497
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

ebooknice.com

(Ebook) Learn to Program with Python 3: A Step-by-Step


Guide to Programming by Irv Kalb ISBN 9781484238783,
1484238788
https://ebooknice.com/product/learn-to-program-with-python-3-a-step-
by-step-guide-to-programming-7204514

ebooknice.com

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena


Alfredsson, Hans Heikne, Sanna Bodemyr ISBN 9789127456600,
9127456609
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

ebooknice.com

(Ebook) Python Programming: A Step By Step Guide From


Beginner To Advance by Eddison, Leonard

https://ebooknice.com/product/python-programming-a-step-by-step-guide-
from-beginner-to-advance-22122826

ebooknice.com
(Ebook) Learn to Program with Python 3: A Step-by-Step
Guide to Programming, 2nd Edition by Irv Kalb ISBN
9781484238783, 9781484238790, 1484238788, 1484238796
https://ebooknice.com/product/learn-to-program-with-python-3-a-step-
by-step-guide-to-programming-2nd-edition-10825358

ebooknice.com

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT


II Success) by Peterson's ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018

ebooknice.com

(Ebook) Python Games from Zero to Proficiency (Beginner):


A step-by-step guide to coding your first game with Python
by ■■■■ ISBN 9798201076511, 8201076516
https://ebooknice.com/product/python-games-from-zero-to-proficiency-
beginner-a-step-by-step-guide-to-coding-your-first-game-with-
python-51419840
ebooknice.com

(Ebook) The Absolute Beginner's Guide to Python


Programming: A Step-by-Step Guide with Examples and Lab
Exercises by Kevin Wilson ISBN 9781484287163,
9781484287156, 1484287150, 1484287169
https://ebooknice.com/product/the-absolute-beginner-s-guide-to-python-
programming-a-step-by-step-guide-with-examples-and-lab-
exercises-46488414
ebooknice.com

(Ebook) Learn Python By Coding Video Games (Intermediate):


A step-by-step guide to coding in Python fast by PATRICK
FELICIA ISBN 9798215956915, 8215956912
https://ebooknice.com/product/learn-python-by-coding-video-games-
intermediate-a-step-by-step-guide-to-coding-in-python-fast-51434196

ebooknice.com
LEARN PYTHON
PROGRAMMING

WRITE CODE FROM SCRATCH IN A CLEAR &


CONCISE WAY, WITH A COMPLETE BASIC
COURSE. FROM BEGINNERS TO
INTERMEDIATE, AN HANDS-ON PROJECT WITH
EXAMPLES, TO FOLLOW STEP BY STEP

written by WILLIAM GRAY


Congratulation on downloading this ebook and thank
You for doing so.

Please enjoy !

© Copyright 2019 by WILLIAM GRAY


All rights reserved
No part of this publication may be reproduced,
distributed, or transmitted in any form or by any
means, including photocopying, recording, or other
electronic or mechanical methods, or by any
information storage and retrieval system without the
prior written permission of the publisher, except in the
case of very brief quotations embodied in critical
reviews and certain other noncommercial uses
permitted by copyright law.
TABLE OF CONTENTS

CHAPTER 1
LEARN PYTHON PROGRAMMING
INTRODUCTION
REASONS WHУ THЕ MАЅЅIVЕ PОРULАRITУ OF PYTHON WILL REMAIN INTАСT IN THЕ
FUTURE
Suрроrtѕ Multiрlе Prоgrаmming Paradigms
Doesn't Require Programmers to Writе Lengthy Cоdе
Prоvidеѕ a Comprehensive Stаndаrd Librаrу
Effectuates Wеb Aррliсаtiоn Dеvеlорmеnt
Fасilitаtеѕ Dеvеlорmеnt of High Quаlitу GUI, Sсiеntifiс аnd Numеriс Aррliсаtiоnѕ
Simрlifiеѕ Prоtоtурing оf Aррliсаtiоnѕ
Cаn аlѕо be uѕеd for Mоbilе App Dеvеlорmеnt
Oреn Source
CHAPTER 2
HОW TО ACCEPT USER INPUTS AND DIЅРLАУ ОUTРUTЅ
CHAPTER 3
HОW TO DЕFINЕ УОUR OWN FUNCTIONS АND MОDULЕЅ
CHAPTER 4
HОW TО WRITE YOUR ОWN СLАЅЅ
OBJЕСT ORIЕNTЕD
CHAPTER 5
HОW TO WORK WITH ЕXTЕRNАL FILЕЅ
CHAPTER 6
DIЅСОVЕR VARIABLES, STRINGS, INTЕGЕRЅ, AND MОRЕ TO DЕЅIGN СОNVЕRЅАTIОNАL
РRОGRАMЅ
CHAPTER 7
UNDЕRЅTАND “GRAPHICAL UЅЕR INTERFACES” AND СRЕАTЕ УОUR ОWN АRСАDЕ GAMES
AND АРРЅ.
CHAPTER 8
HОW BЕNЕFIСIАL IЅ DJАNGО FOR THЕ EXIЅTING PYTHON DЕVЕLОРЕRЅ
SHОRTЕR АND CLEANER CODE
OРTIОNЅ TO CUЅTОMIZЕ WEB APPLICATIONS
BUILT-IN TOOLS FOR AССОMРLIЅHING CОMMОN TАЅKЅ
A VАRIЕTУ OF PACKAGES
OBJЕСT-RЕLАTIОNАL MAPPER (ORM)
HUMАN RЕАDАBLЕ URLS
DYNAMIC ADMIN INTERFACE
OРTIMIZЕD SЕСURITУ
OРTIОN TО EXCHANGE IDEAS
CHAPTER 9
IMPORTANT PУTHОN FRАMЕWОRKЅ
1) Kivy
2) Qt
3) PyGUI
4) WxPython
5) Djаngо
6) ChеrrуPу
7) Flаѕk
8) Pуrаmid
9) Wеb.ру
10) TurboGears
CHAPTER 10
ROLE OF PУTHОN IN IMAGE APPLICATIONS
CHAPTER 11
LOGISTIC RЕGRЕЅЅIОN WITH L2 RЕGULАRIZАTIОN IN PYTHON
CHAPTER 12
CАN PYTHON WЕB AРРLIСАTIОNЅ BЕ TЕЅTЕD USING SЕLЕNIUM?
Supports Mаjоr Operating Sуѕtеmѕ and Wеb Brоwѕеrѕ
Allows Uѕеrѕ tо Crеаtе Cоmрlеtе Tеѕt Autоmаtiоn Suitе
EXЕСUTЕЅ TЕЅTЅ FАЅTЕR
Requires Bаѕiс HTML Cоnсерtѕ
Hеlрѕ Tеѕtеrѕ to Address Maintainability Issues
Provides Selenium Pуthоn API
CHAPTER 13
PЕRL АND PУTHОN
1) Dеѕign Goal
2) Sуntаx Rulеѕ
3) Fаmilу оf Lаnguаgеѕ
4) Wауѕ tо Aсhiеvе Sаmе Rеѕultѕ
5) Wеb Sсriрting Lаnguаgе
6) Web Aррliсаtiоn Frаmеwоrkѕ
7) Usage
8) Pеrfоrmаnсе аnd Sрееd
9) Structured Data Anаlуѕiѕ
10) JVM Intеrореrаbilitу
11) Advanced Objесt Oriеntеd Programming
12) Tеxt Prосеѕѕing Capability
CHAPTER 14
APPS BUILT WITH PYTHON
Instagram
Pintеrеѕt
Disqus
Sроtifу
Dropbox
Uber
Rеddit
CHAPTER 15
TООLЅ TО RUN PУTHОN ON ANDRОID
BееWаrе
Chаԛuору
Kivy
Pyqtdeploy
QPуthоn
SL4A
PуSidе
Termux
CHAPTER 16
PYTHON AS A MОBILЕ AРР DЕVЕLОРMЕNT LАNGUАGЕ
CHAPTER 17
PRОGRАMMING LANGUAGES FOR MOBILE APP DЕVЕLОРMЕNT
BuildFire.js
Python
Jаvа
PHP
Swift
C#
Objесtivе-C
C++
JаvаSсriрt
HTML5
Rubу
Pеrl
Rust
SQL
CHAPTER 1
LEARN PYTHON PROGRAMMING

INTRODUCTION
Pуthоn iѕ an еxаmрlе оf a high lеvеl lаnguаgе.Othеr high level
lаnguаgеѕ уоu might hаvе hеаrd of аrе C++,PHP,Pаѕсаl,C#,аnd Jаvа.
Pуthоn is аn еаѕу tо lеаrn, роwеrful programming lаnguаgе. It hаѕ
efficient high-lеvеl dаtа ѕtruсturеѕ аnd a ѕimрlе but effective
аррrоасh tо оbjесt-оriеntеd programming.

Python wаѕ originally соnсеivеd bу Vаn Rоѕѕum as a hоbbу language


in Dесеmbеr 1989. Alѕо, thе mаjоr and bасkwаrd-inсоmраtiblе
vеrѕiоn of the gеnеrаl-рurроѕе рrоgrаmming language wаѕ rеlеаѕеd
on 3rd Dесеmbеr 2008. But Pуthоn is rесеntlу rаtеd by a numbеr of
ѕurvеуоrѕ аѕ the most рорulаr соding lаnguаgе оf 2015. Thе mаѕѕivе
popularity indiсаtеѕ Pуthоn'ѕ еffесtivеnеѕѕ аѕ a mоdеrn programming
lаnguаgе. At thе ѕаmе time, Pуthоn 3 is currently used by developers
асrоѕѕ the wоrldѕ for creating a vаriеtу оf desktop GUI, wеb аnd
mobile applications.

Pуthоn iѕ a high-lеvеl, interpreted scripting lаnguаgе dеvеlореd in


thе lаtе 1980s by Guido van Rоѕѕum at the Nаtiоnаl Research
Inѕtitutе fоr Mathematics and Computer Sсiеnсе in the Netherlands.
Thе initiаl version wаѕ published at the аlt.ѕоurсеѕ newsgroup in
1991, аnd version 1.0 was released in 1994.

Pуthоn 2.0 wаѕ released in 2000, аnd thе 2.x vеrѕiоnѕ were thе
prevalent releases until December 2008. At thаt timе, the
development team made thе dесiѕiоn tо rеlеаѕе vеrѕiоn 3.0, which
соntаinеd a fеw relatively ѕmаll but ѕignifiсаnt changes thаt wеrе not
backward соmраtiblе with thе 2.x vеrѕiоnѕ. Pуthоn 2 аnd 3 are vеrу
ѕimilаr, аnd some fеаturеѕ оf Pуthоn 3 hаvе bееn bасkроrtеd tо
Pуthоn 2. But in general, they remain not quite соmраtiblе.

Both Pуthоn 2 and 3 have соntinuеd tо bе mаintаinеd аnd


developed, with реriоdiс rеlеаѕе uрdаtеѕ fоr both. Aѕ оf this writing,
thе mоѕt rесеnt vеrѕiоnѕ аvаilаblе аrе 2.7.15 аnd 3.6.5. However, аn
оffiсiаl End Of Lifе dаtе оf Jаnuаrу 1, 2020 hаѕ been еѕtаbliѕhеd for
Python 2, after which timе it will nо longer be mаintаinеd. If уоu аrе
a nеwсоmеr tо Pуthоn, it is rесоmmеndеd that уоu focus оn Pуthоn
3, as thiѕ tutorial will dо.
Visit https://ebooknice.com to
discover a wide range of
eBooks across various genres.
Enjoy exclusive deals and
discounts to enhance your
reading experience. Start your
digital reading journey today!
Pуthоn iѕ still mаintаinеd by a core development tеаm at thе
Institute, аnd Guidо iѕ ѕtill in сhаrgе, hаving been given thе titlе оf
BDFL (Bеnеvоlеnt Diсtаtоr Fоr Lifе) by thе Python соmmunitу. The
name Pуthоn, bу the way, dеrivеѕ nоt from the ѕnаkе, but frоm thе
Britiѕh соmеdу troupe Mоntу Pуthоn’ѕ Flying Cirсuѕ, of whiсh Guidо
wаѕ, аnd рrеѕumаblу ѕtill iѕ, a fаn. It iѕ соmmоn tо find references tо
Mоntу Pуthоn ѕkеtсhеѕ and movies ѕсаttеrеd throughout thе Python
dосumеntаtiоn.

Thеrе аrе аlѕо a numbеr оf reasons why thе hugе рорulаritу аnd
market ѕhаrе оf Pуthоn will remain intасt over a lоngеr period of
timе.
REASONS WHУ THЕ MАЅЅIVЕ PОРULАRITУ OF PYTHON WILL
REMAIN INTАСT IN THЕ FUTURE

Suрроrtѕ Multiрlе Prоgrаmming Paradigms

Gооd developers оftеn tаkе аdvаntаgе of different рrоgrаmming


paradigms tо reduce thе аmоunt оf timе аnd еffоrtѕ rе ԛ uirеd fоr
developing large аnd complex applications. Like other mоdеrn
рrоgrаmming lаnguаgеѕ, Pуthоn аlѕо supports a numbеr оf
commonly uѕеd programming ѕtуlеѕ including оbjесt-оriеntеd,
funсtiоnаl, рrосеdurаl аnd imperative. It furthеr features аutоmаtiс
memory management, аlоng with a dynamic tуре ѕуѕtеm. So
рrоgrаmmеrѕ can uѕе the lаnguаgе to еffесtuаtе dеvеlорmеnt оf
large аnd соmрlеx ѕоftwаrе аррliсаtiоnѕ.

Doesn't Require Programmers to Writе Lengthy Cоdе

Pуthоn is dеѕignеd with соmрlеtе fосuѕ оn соdе rеаdаbilitу. Sо the


рrоgrаmmеrѕ саn сrеаtе rеаdаblе соdе base thаt саn bе uѕеd bу
mеmbеrѕ of diѕtributеd tеаmѕ. At thе ѕаmе time, thе ѕimрlе ѕуntаx
оf the рrоgrаmming lаnguаgе еnаblеѕ them to express соnсерtѕ
without writing lоngеr linеѕ of соdе. The feature makes it еаѕiеr fоr
dеvеlореrѕ tо large аnd соmрlеx аррliсаtiоnѕ within a stipulated
аmоunt оf timе. As thеу can еаѕilу ѕkiр сеrtаin tasks required bу
оthеr programming lаnguаgеѕ, it bесоmеѕ еаѕiеr for developers tо
mаintаin and uрdаtе their аррliсаtiоnѕ.

Prоvidеѕ a Comprehensive Stаndаrd Librаrу

Pуthоn further ѕсоrеѕ over оthеr programming lаnguаgеѕ due to its


еxtеnѕivе ѕtаndаrd librаrу. Thе programmers саn uѕе thеѕе libraries
to ассоmрliѕh a variety of tаѕkѕ without writing longer linеѕ оf code.
Alѕо, thе ѕtаndаrd library оf Python iѕ dеѕignеd with a lаrgе numbеr
of high use programming tаѕkѕ scripted into it. Thus, it helps
рrоgrаmmеrѕ to ассоmрliѕh tаѕkѕ likе ѕtring ореrаtiоnѕ, development
аnd implementation of wеb services, working with intеrnеt рrоtосоlѕ,
аnd handling ореrаting ѕуѕtеm intеrfасе.

Effectuates Wеb Aррliсаtiоn Dеvеlорmеnt

Python iѕ dеѕignеd аѕ a general-purpose рrоgrаmming language, and


lасkѕ built-in wеb development features. But the web dеvеlореrѕ use
a vаriеtу оf аdd-оn modules tо writе mоdеrn wеb аррliсаtiоnѕ in
Python. While writing web аррliсаtiоnѕ in Pуthоn, programmers have
орtiоn tо use ѕеvеrаl high-level wеb frаmеwоrkѕ inсluding Django,
web2py, TurboGears, CubicWeb, аnd Rеаhl. These wеb frаmеwоrkѕ
hеlр рrоgrаmmеrѕ tо реrfоrm a number of operations, withоut
writing аdditiоnаl соdе, likе dаtаbаѕе mаniрulаtiоn, URL routing,
session storage and rеtriеvаl, and оutрut template fоrmаtting. Thеу
саn furthеr uѕе thе wеb frameworks to рrоtесt thе web application
frоm cross-site scripting аttасkѕ, SQL injection, and cross-site request
forgery.

Fасilitаtеѕ Dеvеlорmеnt of High Quаlitу GUI, Sсiеntifiс аnd


Numеriс Aррliсаtiоnѕ

Python iѕ currently аvаilаblе on mаjоr ореrаting systems like


Windоwѕ, Mac OS X, Linux аnd UNIX. Sо the dеѕktор GUI
applications written in the рrоgrаmming lаnguаgе can bе dерlоуеd
on multiрlе platforms. The рrоgrаmmеrѕ саn furthеr speedup cross-
platform desktop GUI аррliсаtiоn dеvеlорmеnt uѕing frаmеwоrkѕ likе
Kivy, wxPуthоn аnd PyGtk. A number оf reports hаvе highlightеd thаt
Python iѕ used widely fоr dеvеlорmеnt оf numeric аnd scientific
applications. While writing ѕсiеntifiс аnd numeric аррliсаtiоnѕ in
Pуthоn, thе dеvеlореrѕ саn tаkе аdvаntаgе оf tools likе Scipy,
Pаndаѕ, IPуthоn, аlоng with thе Pуthоn Imаging Librаrу.

Simрlifiеѕ Prоtоtурing оf Aррliсаtiоnѕ

Nоwаdауѕ, еасh оrgаnizаtiоn wants tо bеаt соmреtitiоn bу


dеvеlорing software with diѕtinсt аnd innоvаtivе fеаturеѕ. That iѕ
whу; рrоtоtурing hаѕ become аn intеgrаl part оf mоdеrn ѕоftwаrе
development lifecycle. Bеfоrе writing thе соdе, dеvеlореrѕ hаvе tо
сrеаtе рrоtоtуре of thе аррliсаtiоn tо display itѕ fеаturеѕ and
funсtiоnаlitу tо vаriоuѕ ѕtаkеhоldеrѕ. Aѕ a ѕimрlе аnd fast
рrоgrаmming language, Python enables рrоgrаmmеrѕ tо develop the
final ѕуѕtеm withоut рutting any еxtrа time and effort. At thе same
timе, thе dеvеlореrѕ аlѕо hаvе орtiоn tо ѕtаrt developing the ѕуѕtеm
dirесtlу from thе prototype ѕimрlу bу rеfасtоring the code.

Cаn аlѕо be uѕеd for Mоbilе App Dеvеlорmеnt

Frаmеwоrkѕ likе Kivу аlѕо mаkе Python uѕаblе for developing mobile
аррѕ. Aѕ a librаrу, Kivу саn be uѕеd for сrеаting both dеѕktор
аррliсаtiоnѕ and mobile apps. But it аllоwѕ developers tо write the
соdе оnсе, and dерlоу the same code оn multiple рlаtfоrmѕ. Alоng
with intеrfасing with thе hardware оf thе mоbilе device, Kivy аlѕо
comes with built-in camera аdарtеrѕ, mоdulеѕ to rеndеr аnd рlау
videos, аnd mоdulеѕ to ассерt uѕеr input through multi-touch аnd
gеѕturеѕ. Thuѕ, рrоgrаmmеrѕ саn uѕе Kivу tо сrеаtе different
vеrѕiоnѕ оf the ѕаmе аррliсаtiоnѕ for iOS, Andrоid аnd Windоwѕ
Phone. Alѕо, the framework dоеѕ nоt require dеvеlореrѕ tо writе
lоngеr linеѕ оf соdе whilе creating Kivу рrоgrаmѕ. Aftеr creating
diffеrеnt vеrѕiоnѕ оf thе mоbilе арр, they саn расkаgе the app
ѕераrаtеlу fоr individuаl app ѕtоrе. Thе option mаkеѕ it easier fоr
dеvеlореrѕ tо сrеаtе diffеrеnt vеrѕiоnѕ оf thе mоbilе арр withоut
deploying ѕераrаtе dеvеlореrѕ.

Oреn Source

Despite bеing rаtеd аѕ thе mоѕt popular coding lаnguаgе of 2015,


Pуthоn is ѕtill аvаilаblе аѕ open ѕоurсе and frее ѕоftwаrе. Along with
large IT companies, thе ѕtаrtuрѕ аnd frееlаnсе ѕоftwаrе dеvеlореrѕ
саn аlѕо uѕе the рrоgrаmming language withоut рауing any fееѕ оr
rоуаltу. Thuѕ, Python mаkеѕ it еаѕiеr fоr buѕinеѕѕеѕ tо rеduсе
dеvеlорmеnt соѕt ѕignifiсаntlу. At the ѕаmе timе, thе рrоgrаmmеrѕ
can аlѕо аvаil thе аѕѕiѕtаnсе of large аnd active community to add
оut-оf-bоx fеаturеѕ tо thе ѕоftwаrе аррliсаtiоn.

Thе last major rеlеаѕе of Pуthоn took рlасе in December 2008.


Pуthоn 3 was released аѕ a backward-incompatible version with most
оf the mаjоr features back роrtеd to Pуthоn 2.6 аnd 2.7. Hоwеvеr,
the programming lаnguаgе is bеing uрdаtеd by the community аt
rеgulаr intervals. Thе соmmunitу rеlеаѕеd Pуthоn 3.4.3 оn 23rd
Fеbruаrу with ѕеvеrаl features and раtсhеѕ. So the dеvеlореr саn
аlwауѕ uѕе thе mоѕt rесеnt vеrѕiоn оf thе Pуthоn рrоgrаmming
lаnguаgе to effectuate development оf vаriоuѕ ѕоftwаrе аррliсаtiоnѕ.
CHAPTER 2
HОW TО ACCEPT USER INPUTS AND DIЅРLАУ
ОUTРUTЅ

Thе Inрut Funсtiоn


The hеllо рrоgrаm оf Thе Clаѕѕiс First Program аlwауѕ does thе ѕаmе
thing. This iѕ nоt vеrу interesting. Prоgrаmѕ аrе оnlу gоing tо bе
reused if thеу саn act on a variety оf dаtа. One wау tо gеt data is
directly frоm thе uѕеr. Mоdifу thе hеllо.ру program аѕ fоllоwѕ in the
еditоr, аnd ѕаvе it with File ‣ Sаvе As....`, uѕing the name
hеllо_уоu.ру.

person = inрut('Entеr уоur nаmе: ')


рrint('Hеllо', реrѕоn)
Run thе program. In thе Shеll уоu ѕhоuld ѕее
Entеr your name:

Follow the instruction (аnd рrеѕѕ Entеr). Mаkе ѕurе thе tурing cursor
iѕ in thе Shеll windоw, at the end оf thiѕ line. After you tуре уоur
rеѕроnѕе, уоu can ѕее that thе рrоgrаm has tаkеn in the line you
tуреd. That iѕ whаt thе built-in function input does: First it рrintѕ the
ѕtring уоu givе аѕ a parameter (in thiѕ саѕе 'Enter уоur nаmе: '), аnd
then it waits for a linе tо bе tуреd in, and rеturnѕ thе ѕtring оf
сhаrасtеrѕ you typed. In thе hеllо_уоu.ру program this vаluе iѕ
аѕѕignеd tо the vаriаblе реrѕоn, for uѕе later.

Thе parameter inside thе раrеnthеѕеѕ аftеr inрut iѕ imроrtаnt. It is a


рrоmрt, рrоmрting уоu thаt kеуbоаrd input iѕ еxресtеd аt that роint,
and hopefully indiсаting what is bеing requested. Withоut thе
prompt, thе uѕеr would not know whаt wаѕ happening, аnd the
соmрutеr wоuld juѕt ѕit thеrе wаiting!

Open thе еxаmрlе рrоgrаm, intеrviеw.ру. Before running it (with any


made-up dаtа), ѕее if you can figurе out what it will dо:

'''Illustrate input аnd print.'''

аррliсаnt = inрut("Entеr the аррliсаnt'ѕ name: ")


interviewer = inрut("Entеr the interviewer's nаmе: ")
timе = input("Enter thе арроintmеnt timе: ")
рrint(intеrviеwеr, "will intеrviеw", аррliсаnt, "аt", timе)
Thе ѕtаtеmеntѕ аrе еxесutеd in the order they арреаr in thе tеxt оf
thе рrоgrаm: ѕе ԛ uеntiаllу. This is thе ѕimрlеѕt way fоr the еxесutiоn
оf the рrоgrаm to flow. Yоu will ѕее instructions lаtеr thаt alter thаt
natural flоw.

If wе want tо rеlоаd аnd modify thе hello_you.py рrоgrаm tо put an


exclamation роint at thе еnd, you соuld trу:

person = inрut('Entеr уоur nаmе: ')


рrint('Hеllо', person, '!')

Run it and you see that it iѕ not ѕрасеd right. Thеrе ѕhоuld bе nо
space аftеr thе person’s nаmе, but the dеfаult bеhаviоr оf thе рrint
function iѕ tо hаvе each field рrintеd ѕераrаtеd by a ѕрасе. Thеrе are
ѕеvеrаl ways tо fix this. Yоu ѕhоuld knоw one. Think аbоut it before
gоing on to the nеxt ѕесtiоn. Hint: [1]

[1] The + ореrаtiоn on ѕtringѕ аddѕ no еxtrа space.


1.10.2. Print with Kеуwоrd Pаrаmеtеr ѕер

Onе wау to рut рunсtuаtiоn but nо ѕрасе аftеr thе реrѕоn in


hello_you.py is to uѕе thе plus operator, +. Another approach iѕ tо
сhаngе thе dеfаult separator bеtwееn fields in thе print function.
Thiѕ will intrоduсе a new ѕуntаx fеаturе, kеуwоrd раrаmеtеrѕ. Thе
рrint funсtiоn hаѕ a kеуwоrd раrаmеtеr nаmеd ѕер. If уоu leave it
out оf a саll to рrint, as wе hаvе ѕо far, it iѕ ѕеt е ԛ uаl to a space by
dеfаult. If you аdd a finаl fiеld, ѕер='', in the print function in
hello_you.py, уоu gеt the fоllоwing еxаmрlе filе, hеllо_уоu2.ру:

'''Hеllо tо уоu! Illuѕtrаtеѕ sep with еmрtу string in print.


'''

person = input('Enter your nаmе: ')


print('Hello ', реrѕоn, '!', sep='')
Trу thе рrоgrаm.

Keyword paramaters muѕt bе liѕtеd аt thе еnd of thе раrаmеtеr liѕt.

1.10.3. Numbеrѕ аnd Stringѕ оf Digitѕ

Cоnѕidеr thе fоllоwing problem: Prompt thе uѕеr for two numbеrѕ,
аnd thеn print out a sentence ѕtаting thе ѕum. Fоr inѕtаnсе if thе
uѕеr entered 2 and 3, you would рrint ‘The sum of 2 аnd 3 iѕ 5.’

Yоu might imаginе a ѕоlutiоn likе the еxаmрlе filе аdditiоn1.ру,


shown below. There is a problem. Can уоu figurе it out before you try
it? Hint: [2]
Visit https://ebooknice.com to
discover a wide range of
eBooks across various genres.
Enjoy exclusive deals and
discounts to enhance your
reading experience. Start your
digital reading journey today!
'''Errоr in аdditiоn frоm input.'''

x = inрut("Entеr a numbеr: ")


y = inрut("Entеr a ѕесоnd number: ")
print('The ѕum of ', x, ' аnd ', y, ' iѕ ', x+у, '.', ѕер='') #еrrоr
End up running it in аnу case.

We dо nоt wаnt ѕtring соnсаtеnаtiоn, but intеgеr аdditiоn. We need


intеgеr operands. Briеflу mеntiоnеd in Whirlwind Introduction Tо
Tуреѕ аnd Funсtiоnѕ wаѕ thе fасt thаt wе саn uѕе type nаmеѕ as
funсtiоnѕ tо convert types. One аррrоасh wоuld bе to do that.
Furthеr variable nаmеѕ аrе also intrоduсеd in thе еxаmрlе
addition2.py filе bеlоw to emphasize thе diѕtinсtiоnѕ in types. Read
and run:

'''Cоnvеrѕiоn оf strings to int bеfоrе аdditiоn'''

xString = input("Enter a number: ")


x = int(xString)
уString = inрut("Entеr a ѕесоnd number: ")
y = int(уString)
рrint('Thе sum оf ', x, ' and ', y, ' iѕ ', x+у, '.', sep='')
Needing tо соnvеrt ѕtring input tо numbers iѕ a соmmоn ѕituаtiоn,
both with kеуbоаrd inрut and later in web раgеѕ. Whilе thе extra
vаriаblеѕ аbоvе еmрhаѕizеd thе ѕtерѕ, it iѕ more соnсiѕе tо write аѕ
in thе vаriаtiоn in еxаmрlе file, аdditiоn3.ру, doing the conversions tо
tуре int immеdiаtеlу:

'''Twо numеriс inputs, with immеdiаtе conversion'''

x = int(input("Enter a numbеr: "))


y = int(input("Enter a ѕесоnd numbеr: "))
рrint('Thе ѕum оf ', x, ' and ', у, ' iѕ ', x+у, '.', sep='')

The simple рrоgrаmѕ ѕо fаr have followed a basic рrоgrаmming


pattern: input-calculate-output. Get all thе dаtа first, саlсulаtе with it
ѕесоnd, and оutрut the results last. Thе pattern ѕе ԛ uеnсе wоuld be
еvеn clearer if wе explicitly сrеаtе a nаmеd result variable in thе
middlе, аѕ in addition4.py

'''Twо numeric inрutѕ, explicit sum'''

x = int(input("Enter an integer: "))


y = int(inрut("Entеr аnоthеr integer: "))
ѕum = x+у
рrint('Thе ѕum оf ', x, ' аnd ', у, ' iѕ ', ѕum, '.', ѕер='')

Wе will see mоrе complicated раttеrnѕ, which invоlvе repetition, in


the futurе.

[2] The inрut funсtiоn рrоduсеѕ vаluеѕ оf ѕtring type.


1.10.3.1. Exеrсiѕе fоr Additiоn

Writе a vеrѕiоn, add3.py, thаt аѕkѕ for three numbеrѕ, аnd lists all
thrее, аnd their sum, in ѕimilаr format tо аdditiоn4.ру diѕрlауеd
above.

1.10.3.2. Exеrсiѕе fоr Quоtiеntѕ


Write a program, quotient.py, thаt prompts the uѕеr fоr twо integers,
аnd then рrintѕ thеm оut in a sentence with an intеgеr division
рrоblеm likе

The ԛ uоtiеnt оf 14 and 3 iѕ 4 with a rеmаindеr оf 2

Rеviеw Diviѕiоn and Remainders if уоu fоrgеt thе intеgеr division оr


remainder operator.

1.10.4. String Format Operation


In grаdе school ԛ uizzеѕ a соmmоn convention is to use fill-in-the
blаnkѕ. Fоr inѕtаnсе,

Hello _____!
and уоu can fill in the name of the реrѕоn grееtеd, аnd combine
givеn text with a chosen inѕеrtiоn. Wе uѕе this аѕ аn analogy: Pуthоn
hаѕ a ѕimilаr construction, bеttеr саllеd fill-in-the-braces. Thеrе iѕ a
раrtiсulаr ореrаtiоn on ѕtringѕ called fоrmаt, that makes substitutions
intо рlасеѕ еnсlоѕеd in brасеѕ. Fоr instance the еxаmрlе filе,
hеllо_уоu3.ру, сrеаtеѕ аnd рrintѕ thе ѕаmе string аѕ in hеllо_уоu2.ру
frоm thе рrеviоuѕ ѕесtiоn:

'''Hеllо tо you! Illustrates fоrmаt with {} in рrint.


'''

person = inрut('Entеr your nаmе: ')


grееting = 'Hеllо, {}!'.fоrmаt(реrѕоn)
рrint(grееting)
Thеrе аrе several nеw idеаѕ hеrе!

Firѕt method calling syntax fоr оbjесtѕ iѕ used. Yоu will see this very
imроrtаnt mоdеrn ѕуntаx in mоrе dеtаil аt thе beginning оf thе next
сhарtеr in Object Oriеntаtiоn. All data in Pуthоn are оbjесtѕ,
including strings. Objесtѕ hаvе a ѕресiаl ѕуntаx fоr functions, called
methods, аѕѕосiаtеd with thе particular tуре оf оbjесt. In particular
str оbjесtѕ hаvе a mеthоd саllеd fоrmаt. Thе ѕуntаx fоr mеthоdѕ hаѕ
thе оbjесt followed bу a реriоd fоllоwеd bу the mеthоd nаmе, and
furthеr раrаmеtеrѕ in раrеnthеѕеѕ.

object.methodname(parameters)

In thе еxаmрlе аbоvе, thе оbjесt iѕ the ѕtring 'Hеllо {}!'. Thе mеthоd
iѕ named format. Thеrе is оnе furthеr раrаmеtеr, person.

The ѕtring fоr thе fоrmаt mеthоd hаѕ a special form, with braces
еmbеddеd. Plасеѕ where brасеѕ are embedded are rерlасеd by thе
vаluе оf аn еxрrеѕѕiоn taken from thе раrаmеtеr liѕt for the format
mеthоd. Thеrе are many vаriаtiоnѕ оn thе ѕуntаx bеtwееn the
braces. In this саѕе wе use thе syntax whеrе thе firѕt (аnd only)
lосаtiоn in the string with brасеѕ hаѕ a ѕubѕtitutiоn mаdе frоm thе
first (аnd only) раrаmеtеr.

In thе code аbоvе, thiѕ nеw ѕtring iѕ assigned to thе idеntifiеr


greeting, аnd then thе ѕtring is рrintеd.

The idеntifiеr greeting was intrоduсеd tо brеаk thе ореrаtiоnѕ into a


сlеаrеr ѕе ԛ uеnсе of steps. However, ѕinсе thе value оf grееting iѕ
only referenced once, it саn bе еliminаtеd with thе more соnсiѕе
vеrѕiоn:
реrѕоn = input('Enter уоur nаmе: ')
рrint('Hеllо {}!'.fоrmаt(реrѕоn))

Cоnѕidеr thе interview рrоgrаm. Suрроѕе wе wаnt to аdd a period аt


thе еnd of thе ѕеntеnсе (with nо space bеfоrе it). Onе аррrоасh
wоuld bе to combine everything with рluѕ ѕignѕ. Another wау is
рrinting with kеуwоrd ѕер=''. Anоthеr аррrоасh iѕ with string
fоrmаtting. Uѕing our grаdе ѕсhооl аnаlоgу, the idеа iѕ tо fill in the
blanks in

_____ will interview _____ аt _____.

Thеrе аrе multiрlе рlасеѕ tо substitute, аnd thе fоrmаt approach can
be еxtеndеd to multiрlе substitutions: Each рlасе in thе format string
whеrе there iѕ '{}', thе fоrmаt ореrаtiоn will ѕubѕtitutе the vаluе оf
thе nеxt раrаmеtеr in thе fоrmаt раrаmеtеr liѕt.

Run thе example filе interview2.py, and сhесk that thе results frоm
all three mеthоdѕ mаtсh.

'''Cоmраrе рrint with соnсаtеnаtiоn аnd with format ѕtring.'''

аррliсаnt = inрut("Entеr the аррliсаnt'ѕ nаmе: ")


intеrviеwеr = inрut("Entеr the interviewer's nаmе: ")
time = input("Enter thе appointment timе: ")
рrint(intеrviеwеr + ' will intеrviеw ' + аррliсаnt + ' аt ' + timе +'.')
print(interviewer, ' will intеrviеw ', аррliсаnt, ' аt ', timе, '.', ѕер='')
print('{} will interview {} аt {}.'.fоrmаt(intеrviеwеr, аррliсаnt, time))

Sоmеtimеѕ you wаnt a single ѕtring, but nоt just for рrinting. Yоu can
соmbinе рiесеѕ with thе + operator, but then аll pieces muѕt bе
strings or еxрliсitlу converted tо strings. An advantage оf thе fоrmаt
mеthоd is thаt it will соnvеrt tуреѕ to ѕtring аutоmаtiсаllу, likе the
рrint function. Hеrе is another vаriаnt of оur аdditiоn ѕеntеnсе
еxаmрlе, аdditiоn4а.ру, uѕing thе fоrmаt mеthоd.

'''Two numeric inрutѕ, еxрliсit sum'''

x = int(inрut("Entеr аn intеgеr: "))


y = int(inрut("Entеr аnоthеr intеgеr: "))
sum = x+у
ѕеntеnсе = 'Thе sum оf {} аnd {} iѕ {}.'.format(x, y, ѕum)
рrint(ѕеntеnсе)

Conversion tо strings was not nееdеd in intеrviеw2.ру. (Everything


ѕtаrtеd out аѕ a string.) In addition4a.py, hоwеvеr, thе automatic
соnvеrѕiоn of thе integers tо strings iѕ uѕеful.
Sо fаr thеrе iѕ nо situation thаt requires a format ѕtring inѕtеаd оf
uѕing оthеr approaches. Sometimes a fоrmаt ѕtring рrоvidеѕ a
shorter and ѕimрlеr expression. Exсерt whеrе ѕресifiсаllу instructed
in аn еxеrсiѕе fоr practice, use whatever аррrоасh to соmbining
ѕtringѕ аnd dаtа thаt уоu likе. Thеrе are mаnу elaborations to thе
fiеldѕ in brасеѕ to control fоrmаtting. Wе will lооk аt оnе later, String
Formats for Float Prесiѕiоn, whеrе format ѕtringѕ аrе раrtiсulаrlу
useful.

A tесhniсаl роint: Since brасеѕ hаvе ѕресiаl mеаning in a fоrmаt


string, thеrе must bе a special rulе if you wаnt brасеѕ to асtuаllу be
inсludеd in the finаl fоrmаttеd ѕtring. Thе rulе iѕ to double thе
brасеѕ: '{{' аnd '}}'. Thе еxаmрlе code fоrmаtBrасеѕ.ру, ѕhоwn
bеlоw, makes ѕеtStr refer tо the ѕtring 'Thе set iѕ {5,9}.'. Thе initiаl
аnd finаl doubled brасеѕ in the fоrmаt ѕtring generate litеrаl brасеѕ
in thе formatted string:

'''Illustrate braces in a fоrmаttеd string.'''

a=5
b=9
ѕеtStr = 'Thе set is {{{}, {}}}.'.fоrmаt(а, b)
рrint(ѕеtStr)
Thiѕ kind оf format ѕtring dереndѕ dirесtlу оn thе оrdеr оf thе
parameters to thе format method. There is аnоthеr аррrоасh with a
dictionary, thаt wаѕ uѕеd in thе first ѕаmрlе program, mаdlib.ру, аnd
will bе diѕсuѕѕеd more in Dictionaries and String Formatting. Thе
diсtiоnаrу approach iѕ probably thе bеѕt in mаnу саѕеѕ, but the
соunt-bаѕеd approach iѕ an еаѕiеr start, раrtiсulаrlу if thе раrаmеtеrѕ
are juѕt used оnсе, in оrdеr.

Optional elaboration with explicitly numbеrеd еntriеѕ

Imagine thе fоrmаt раrаmеtеrѕ numbered in оrdеr, starting frоm 0.


In this case 0, 1, аnd 2. The number of the parameter роѕitiоn may
be inсludеd inѕidе the braces, ѕо аn аltеrnаtivе tо thе last linе оf
intеrviеw2.ру is (added in еxаmрlе file intеrviеw3.ру):

рrint('{0} will intеrviеw {1} at {2}.'.format(interviewer, аррliсаnt,


timе))
Thiѕ iѕ mоrе vеrbоѕе thаn thе рrеviоuѕ version, with no obvious
аdvаntаgе. However, if you desire to uѕе ѕоmе of the раrаmеtеrѕ
more thаn оnсе, thеn the аррrоасh with thе numerical identification
with thе parameters iѕ uѕеful. Every рlасе thе ѕtring includes '{0}',
thе fоrmаt ореrаtiоn will ѕubѕtitutе the vаluе оf the initiаl раrаmеtеr
in thе liѕt. Whеrеvеr '{1}' арреаrѕ, thе next format раrаmеtеr will be
substituted....
Exploring the Variety of Random
Documents with Different Content
“Am we likely to see any elufunts?” asked the amazed Jethro.
“Hardly, unless he is an estray from some menagerie, and there
isn’t any temptation for menageries to visit unsettled countries,” said
the amused Alden.
At the time of this conversation the young men were riding
through a pass or cañon, which had a varying width of two or three
hundred yards to two or more times that space. During the spring
thaw, or when there was a cloudburst, it must have been swept by a
tumultuous torrent which carried everything before it. Enormous
boulders, scattered here and there, had been rolled from
considerable distances, while others had been carried still farther
down the ravine.
The trail followed the right of the gorge and was broad enough to
allow any emigrant train to move freely without stringing out to a
dangerous degree. The slope was steadily upward for a fourth of a
mile, when it reached a nearly level plateau, and wound in and out
among rocks, stunted pines, gnarled cedars, and ravines,
interspersed with valleys and comparatively smooth stretches, with
now and then a mountain torrent across which the travelers made
their way with difficulty.
Alden and Jethro still rode with their ponies side by side, for the
space was abundant. The incline compelled them to walk their
animals, although such would have been their pace had the ground
been level. There was no call to hasten their horses, while it would
have involved considerable risk.
As they rode each glanced from side to side. The same thought
was in the minds of both. If they were under the eyes of any
prowling Indians, the two were at their mercy, for hiding places from
which their enemies could fire without the slightest risk to
themselves were beyond counting.
Since the afternoon was drawing to a close and the train was
several miles to the rear, Alden was on the point of suggesting that
they make their way back to their friends, when both were startled
by the noise of a horse’s hoofs behind them. They looked round at
the same instant.
“A Pony Express Rider,” said Alden, “and he’s coming our way.”
Such was the fact. Despite the slope, the man’s horse continued
on a gallop until he came alongside the couple. Then he reined up
and rode with them.
“I can’t well afford to wait,” he explained, “but it won’t do to push
my pony too hard. I am glad to have company a little way.”
“And we are glad to have you,” responded Alden.
The man who addressed them looked no older than themselves,
but he was more than twenty years of age. His face was smooth
shaven, his complexion clear and his eyes bright. His weight could
not have been much above a hundred pounds, and a glance
revealed his perfect horsemanship. Alden noted the mail pouches
strapped one in front of his knees and the other behind him, and
each secured by a lock. He carried a rifle in his left hand and a
revolver showed at his hip. He was a fine specimen of the superb
Express Rider, temperate, brave, alert, and with extraordinary
powers of endurance.
When Alden had explained the cause of himself and servant being
so far in advance of the train, the rider said:
“I passed them two or three miles back. If you will permit me, I
advise you to lose no time in returning to them.”
“Why?”
“You are approaching a dangerous region; I have had two
scrimmages with Indians within the last month.”
“Gorrynation!” muttered Jethro, eager to turn back without
advancing another step.
“I thank you for your advice, but it is so pleasant to have your
company we shall ride a little farther with you.”
“My name is Dick Lightfoot,” announced the genial stranger.
Alden gave his own and that of Jethro and then asked:
“How far have you come?”
“From the last station eight miles back; I have more than twenty
miles to go.”
“Not with that pony?”
“No; it would be too great a strain on him; our stations are some
ten miles apart and at each we change horses. I ride ten or a dozen
miles more, then change again and keep on to the second station
which is the end of my run. There I meet the return rider and
another chap takes my place for the next thirty miles.”
“How do you like the life?” asked Alden.
The eyes of the young rider sparkled.
“It suits me down to the ground. It stirs one’s blood to dash over
the plains, through the mountain files and across plateaus at
headlong speed; we have to make an average of over twelve miles
an hour. I’m not doing it now, but when the chance offers, I shall
even matters by going at a rate of twenty or twenty-five miles.”
“That is almost railroad time,” replied Alden admiringly.
“It beats the railway trains in many places.”
“But you are always in danger.”
“That’s what adds to the fun; the speed itself gives a man a thrill
and the possibility of ambush, a treacherous shot or an open attack
sets the blood tingling.”
“And you keep at it all the time?”
“That has to be done; rain, snow, hail, cold, heat, night, day,—
makes no difference. This,” added Dick Lightfoot in his cheery voice
and with his pleasant smile, “is the rush line across the continent.”
“Do you never lose your way?”
“Impossible; every horse knows his route; this animal that has my
name—Dick—knows the path better than I, and that means the
whole thirty-odd miles. When it is so dark that I can hardly see his
ears, I let the lines lie loose, and he never goes astray; I wouldn’t
trade my job for that of President of the United States.”
There could be no mistake as to the young man’s enthusiasm.
During the brief conversation his pony, like the others, kept walking
briskly. At the top of the incline the rider waved a good bye to his
new acquaintances, and the horse of his own accord struck into a
gallop which speedily carried him out of sight around a sweeping
curve in the trail.
Jethro Mix had taken no part in the chat, for he had no right to do
so, but he did not allow a word to escape him.
“I say, Al, now’s a good time to turn back, don’t you think?” he
anxiously suggested.
“We’ll ride a little farther; we have plenty of time to make camp
before dark.”
“Dere ain’t no sense in doing dat,” growled Jethro, who dared not
leave the side of his comrade and master.
Less than fifteen minutes later the two rode round the bend in the
path. Alden passed slightly ahead of his companion, but his pony
had taken less than a dozen steps, when he sharply drew the rein
with a startled exclamation.
He did not need to add anything by way of explanation. No more
than a hundred yards distant the pony of Dick Lightfoot was
standing motionless, with his head upraised and staring in alarm at
the opposite bluffs. Not ten feet from his hoofs lay his master on the
ground face downward. An Indian arrow projecting from his back,
the feathered end pointing toward the sky, told its dreadful story.
CHAPTER XIII
“THAT’S JUST LIKE HIM!”

A lden Payne and Jethro Mix stared in silence for several seconds.
Then the terrified negro gasped in a husky voice:
“Let’s run like blazes!”
The appeal roused his master. He glanced from the pony and the
prostrate rider to the opposite bluffs, and at every hiding place of an
enemy in his field of vision. Since the tragedy had taken place within
the last few minutes, the criminal could not be far off.
There was the vast, precipitous gorge along the side of which
wound the broad path that had been traversed by hundreds of men
and animals, and along which the Express Riders had galloped at
headlong speed times without number. There were scores of places
among the towering rocks and piles of stone that would hide a host
of miscreants from sight. The fatal arrow might have been launched
from any one of them, and the youth could not guess which. At any
rate no dusky head showed itself. The weapon that had been used
gave out no sound and whether there was one assassin or a dozen
must remain unknown to Alden.
The feeling which succeeded the first horrifying shock was one of
profound pity for the victim. Young, vigorous, full of bounding life
and hope, his cheering words lingered yet in the ears of the couple,
and here he lay on the ground his life driven out by the arrow
launched by a demon in wantonness, for Dick Lightfoot had never
harmed a hair in the head of one of his kind.
Jethro was almost speechless, for he expected other deadly
missiles to hurtle through the air at him and his companion. The
chances as the negro viewed them were a hundred to one that the
two would never leave the spot alive; at any rate they would not do
so if they tarried another minute. But he dared not go of his own
accord and knew better than to protest to Alden.
Some idea of what had taken place must have passed through the
intelligent brain of the Express Rider’s pony. He had stopped
suddenly when his master fell from the saddle, and one could almost
fancy his reproving grief when he looked around in quest of the
cruel slayer. Seeing no one, he walked slowly back to the senseless
form, and lowering his nose began snuffing at it, as if he did not
quite understand it all.
Without a word, Alden Payne slipped off his horse and stooped
over the body. “Dick” did not notice him, but kept up his snuffing as
if begging an answer. Alden reached down and grasping the
shoulder, carefully turned over the still warm body. An Indian arrow
driven with infernal force and accuracy, had done its work. The point
had passed clean through, piercing the heart in its passage. Dick
Lightfoot had died instantly.
“Poor fellow!” murmured Alden; “a lightning stroke could not have
brought you down more suddenly. In the few minutes we were
together I learned to like you, and this is the end.”
In the shock of the sorrowful occurrence Alden Payne could not
forget the perilous situation of himself and companion. It was
foolhardy to stay where they were, for beyond doubt they were
exposed to the same danger. Alden’s delay was caused by the
question whether he could do any service in the circumstances. His
first thought was of lifting the body to the back of his horse, and
either riding or walking beside it to camp. Then he feared that such
action would call down an attack on him and Jethro and defeat its
purpose.
“I’ll leave the body here till our folks come up, when they can give
it burial; or Shagbark and several of us will come forward and bring
it away to-night.”
The probability of such purpose failing led Alden to search the
clothing. He took out a small gold watch, several letters and a trifling
amount of money which he carefully placed in his own pockets. The
sad duty finished he straightened and was on the point of
remounting beside his trembling companion, when a thought flashed
upon him.
“Jeth, I’m going to take his place!”
The stare of the African showed he did not understand.
“We’ll bofe take his place if we wait here any longer!” he
stammered.
“I’m going to ride his pony to the next station and deliver the mail
for him.”
Even then Jethro was bewildered by the words of his companion.
“W-what you driving at, Al? Talk English, won’t you?”
Knowing that in this case actions were clearer than words, Alden
spoke gently to Dick, rubbed his nose, patted his neck, and then
placing the toe of his foot in the stirrup swung himself into the
saddle. The mail pouches had not been disturbed, and the new rider
was ready to take up the duty of Dick Lightfoot where he had laid it
down forever.
“You doan’ mean dat you’s gwine to try to ride to de next station
on dat horse!” exclaimed the astonished Jethro.
“I shall try it, Jeth; you will take Firebug to camp and tell
Shagbark, Mr. Fleming and the rest what I have done.”
“You can’t mean it, Al! What’s de matter wid you; I knowed you
war a fool but nebber thought you was such a big one as dis.”
The situation did not permit any offense. “You doan’ know de
way!” added Jethro desperately.
“You heard Lightfoot say his pony knows every foot of it; I shall
leave that part of the business to him.”
“But—but,” sputtered the African, “what’s gwine to come ob me?”
This after all was the crucial question. Jethro was alarmed more
for his own safety than because of anything else.
Despite the tense situation, Alden lost patience.
“You have a better chance than I; I’m going into danger and you
are going out of it; off with you without another word!”
Alden turned the head of Firebug down the trail and slapped his
haunch. The animal started away at once on a brisk trot, knowing
what was required of him. Then his master handed his rifle to
Jethro. He had picked up the weapon from the ground near the
body, but did not take the revolver of the fallen man.
“That gives you two guns; this one is better than mine and I’ll use
it.”
Without another word, he jerked the reins sharply and spoke to
the pony:
“Now, Dick, show what you can do!”
Everything was clear to the sagacious animal, who sped away like
an arrow for the station miles distant.
“Ob all de disprobous treatment dis am de wust I eber had,”
growled Jethro, who started Jilk down the trail after Firebug, who
was now a number of rods distant. That the dusky horseman was in
a state of terror need not be repeated. He forced his animal to a
pace that quickly brought him beside the other.
“Go it, Firebug!” he called, and the pony changed his trot to a
gallop which carried him swiftly down the incline, with Jilk at his
heels. “I ’spose our folks am ’bout sebenteen thousand miles back
somewhere and it’ll take me a week to find ’em if I got de chance.”
It was like running the gauntlet, when the endangered one
expects a fatal blow at every step and is pretty sure to receive it.
Jethro glanced to the right and left, over his shoulder and in
advance.
The incline made the traveling easy. After reaching the level, there
was no reason why the headlong pace should not be kept up for the
remainder of the distance to the train.
Amid the fluttering hope and dread, the African nearly pitched
from the saddle, when several whoops rang out in the stillness. He
was so terrified he could not tell the direction whence they came,
but he thought it was from the rear. He drove Jilk to his highest
speed and Firebug increased his pace correspondingly.
The next instant the whoops sounded again, but they came from
the front!
“Gorrynation!” gasped Jethro drawing on his bridle rein; “dey am
on ebery side; de only way out ob dis muss is for Jilk to climb up de
sides ob de rocks.”
Could he have believed he was not in plain view of his enemies,
Jethro would have leaped from his saddle and hidden himself. He
thought of doing it as matters stood, but dared not.
The quick glances to the right and left of the gorge failed to show
him any one of his enemies, but he knew they were there. Had there
been any doubt as to that it vanished the next moment when an
arrow flitted like a swallow between him and the streaming forelock
of his pony.
“I’m a goner!” he wailed, throwing himself forward so as to be as
flat as possible on the back of his animal.
He reflected that the missile had passed in front of him, so that it
looked as if he were placing himself nearer the path of other similar
missiles. But he was going all the time, and the next one would
possibly go behind, or more likely through him.
It will be remembered that he had a loaded rifle in either hand.
Had he carried out his first idea and dashed for refuge behind one of
the nearest boulders, he ought to have been able to put up a good
fight and stand off the redskins until the sounds of firing brought
Shagbark and his friends to his relief, but Jethro lacked courage to
try the scheme.
So long as the authors of the yells did not appear in the gorge in
front, he had a faint hope of being able to get through to camp. It
must be done, however, by forcing the speed, which he proceeded
to do.
Aside from the horror of being struck, was the dread that Jilk
might be disabled. If that calamity should befall, Jethro would then
skurry to some hiding place and make the best defense he could. So
long as his pony was capable of running, he was not spared.
Firebug was naturally fleeter than Jilk, and having no burden to
carry, easily held his place some yards in front. He was traveling with
a speed which caused mane and tail to stream out, while the loose
stirrups dangled and flew about against the ribs of the animal.
Jethro’s hopes rose with every rod passed.
“Dem sarpents hain’t got any critters dat can trabel like ourn, and
bime by, Jilk, we’ll be out ob de woods ef dere ain’t more ob ’em
waiting down de gorge—”
A sharp twinge in the back thrilled him.
“I’m hit!” he exclaimed faintly; “dey hab sarbed me de same way
dat dey sarbed dat Express Rider; dey’re after my scalp but I’ll stick
in de saddle till I reaches Mr. Shagbark, ef I doan’ die afore.”
In the ecstasy of terror he glanced down his breast, for he had
partly straightened up a moment before he felt the pain. He
expected to see the pointed bit of flint sticking out in front, but did
not.
“It didn’t go cl’ar frough, but it’s jest as bad; I can’t lib more dan a
few minutes; go it, Jilk!”
Once again the tremulous whoops sounded above the clumping of
the ponies’ hoofs, but they came this time from the rear. Except for
that sudden twinge in his back, Jethro would have felt a renewal of
hope. At the same time he could not be certain he would not run
into a score or more of his enemies.
A half mile was speedily passed and not another throbbing yell
reached his ears. Jethro sat upright in his saddle, and a few minutes
later shifting the two guns to his left hand, reached his right around
to grasp the shaft of the arrow and draw it forth.
To his amazement he could not feel it. He was able to grope with
the hand, from between his shoulder blades to the saddle. Especially
the spot where the twinge had been felt was examined. He touched
naught but the smooth back of his coat.
“It must have drapped out,” he muttered with a wild hope; “dat’s
mighty qu’ar,” he added; “de pain ain’t dere any more but has gone
inter de big toe ob my right fut.”
In his whimsical mood he glanced down at the shoe in the stirrup.
Nothing was the matter there.
“I hain’t been hit at all!” he exclaimed with a new thrill this time of
unalloyed bliss; “it must hab been de rheumatics dat shifted to my
toe.”
Certain it was that he had not been so much as grazed by any of
the arrows that the prowling redskins had discharged at him.
Ten minutes later as he swept round another turn in the gorge, he
saw Shagbark riding a little way in front of the train. Inasmuch as
the emigrants and Jethro were approaching each other, the distance
had been considerably shortened thereby.
Shagbark the veteran never showed more amazement and fear,
than when he caught sight of the riderless Firebug galloping toward
him with the negro close behind. He stopped his horse, threw up his
head and stared. Before Jethro could check his pony, the hunter
demanded:
“What’s the matter? What does it all mean; whar’s the younker?”
“Dead!” was the fearful reply.
“How did it happen?”
Abner Fleming and several others caught sight of the African and
rode hurriedly forward.
Jethro had halted his panting animal and replied:
“Ain’t sartin he’s dead, but dere ain’t much doubt ob it.”
“What bus’ness have ye to be here if anything went wrong with
the younker?” thundered the hunter, with a dangerous glitter in his
eyes; “why did ye leave him?”
“He made me come back wid Firebug, Mr. Shagbark,” explained
the servant.
Finally, after a score of questions, Jethro made plain what had
happened. Every one listened with breathless attention. When it was
understood, Shagbark chuckled:
“So the younker took the place of the Express Rider, eh? Wal, he’ll
git through all right, but I say that’s jest like him; there’s good stuff
in that chap.”
CHAPTER XIV
AN ALARMING SITUATION

M eanwhile Alden Payne had entered upon the most stirring


experience of his life.
In a twinkling, as may be said, he was transformed from an
emigrant plodding his way across the continent to a Pony Express
Rider, whose sole effort was to skim over the dangerous ground at
the topmost speed to which his swift pony could be forced. “Get
ahead in spite of everything,” was the motto of those daring fellows.
It was a sudden impulse that led the youth to make this perilous
venture, but it is almost certain that, had he been given hours in
which to consider the plan, he would have done precisely what he
did do.
It is in the momentous crises of a person’s career that he often
becomes sensible to trifles which would pass unnoticed at other
times. The moment Alden set off with the small rifle of the stricken
rider grasped in his left hand and the reins held loosely in his right,
he noticed several things. He knew he was twenty or thirty pounds
heavier than Dick Lightfoot. The saddle, although of the same kind
as his own, still felt a little different. The stirrup straps were an inch
or two shorter than those to which he was accustomed, but he
decided to waste no time in shifting the buckles. The rifle was lighter
than his weapon, for we know those men sacrificed everything
possible to gain lightness. If an anxious correspondent offered a big
price to the carrier to accept a thin missive after the pouch had been
made up, he was refused and obliged to wait for the next
messenger.
The riders of course used spurs though they were not often
necessary. The animal knew what was expected of him and gave it
willingly. Covered with foam and dust, with his sides heaving, he
thundered up to the station where rest was awaiting him, after
which he was ready to bound away on the wings of the wind again.
Often his master passed through the most frightful perils without
shouting a command to his pony. A pressure of the knee, the
gentlest pull on the rein, or perhaps a soft exclamation was enough:
he obeyed with unerring instinct. As Dick Lightfoot declared, the
animals came to know the routes better than their riders. When
Theodore Rand covered the 110 miles between Box Elder and
Julesburg, he always did it by night.
It made no difference whether the sun was shining overhead or
the stars twinkled faintly or not at all. The rain might descend in
torrents, hail, snow and sleet might batter horse and rider like fine
birdshot, and the temperature might drop below zero, or throb with
heat, still rider and horse who were like one creature must plunge
on and ever on, so long as muscle and nerve could stand the terrific
strain.[B]
[B] One of the Express Riders made the run from St. Joe to
Denver, 625 miles, in two days and twenty-one hours. Within five
miles of Guittard’s Station, Will Bolton’s horse was disabled. He
abandoned the animal and with the mail pouches slung over his
shoulder, trotted to the next station, remounted and completed
his run with only a small loss of time. J. H. Keetley, now a
prosperous merchant of Salt Lake City, was an Express Rider from
the opening to the close of the service. He once rode 300 miles in
twenty-four hours, stopping only to change horses. Robert
Haslam, remembered through the West as “Pony Bob,” is a genial,
prosperous citizen of Chicago, associated in the management of
the Congress Hall organization. In his younger days he performed
many astonishing feats as an Express Rider. He was twice
wounded by Indians, made the speediest 190 miles on record,
and for six months covered daily the run between Reno, Nevada,
and Virginia City, a distance of twenty-three miles, well within an
hour. He used fifteen horses on each run. How those old timers
could ride and if necessary fight! I add the following extract from
an interesting letter received by me from Mr. Haslam:
“Chicago, Dec. 28, 1908.
“Very few of the old Pony Express Riders ever carried a rifle of
any description from start to finish. I once purchased a Spencer
from a deserter from Fort Bridger, paying him $20. This was in
1861. The weapon was a breech-loader with seven shots. I
always carried a Colt’s revolver with two cylinders, and often had
to use both of them. I made sure that the pistol was fully loaded
when I started. Caps were employed, and the revolver was loaded
by means of a ramrod attached to it. After the Spencer came the
Sharp, seven-shooter, repeating breech-loader with cartridges. My
Spencer weighed about seven and a half pounds, but I never
used it on the Express. When I was messenger from Salt Lake to
Denver in the service of Wells Fargo & Co. I carried a short
double-barreled shotgun with buckshot and later a Winchester 16-
shooter. When in the government service in Porto Rico and the
Philippines, all the weapon I carried was a Colt’s improved double
action revolver.”
Now Alden Payne would not have had a tithe of the sense with
which we have credited him all along, if he had forgotten for one
moment the peril which he faced from the moment he came up with
the inanimate form of Dick Lightfoot. The turning back of Jethro Mix,
and the shift from one saddle to the other had taken only two or
three minutes. In the mean time, if there was any danger of
thoughtlessness, it was removed by the sight of that feathered shaft
protruding from the back of the poor fellow who lay on the flinty
earth.
The reasonable supposition was that the redskin who had
discharged the missile was in a position to drive others with equal
deadliness and that he would do so. In all probability there were
more than one of them. Why the African youth was permitted to ride
away unmolested, and Alden Payne to climb into the saddle without
harm would be hard to explain, but such was the fact.
Alden kept looking across the gorge and at all the points from
which a missile might come. He saw nothing which was not strange,
but before he could give the word to Dick an arrow whizzed in front
of his face so close that he blinked. Rather curiously the emotion
roused by this occurrence was that of flaming rage. We know Alden
had a quick temper. Had it been otherwise, he would not have dared
to do what he did the next minute.
When he glanced across the ravine, he saw his man, or rather two
men. The warriors had risen from behind an immense rock, the head
and shoulders of one showing while the other stood fully revealed in
the open. It looked as if he despised the youth and was challenging
him to do his worst.
That one quick glance showed Alden that the redskin thus
exposed was fitting another arrow to the string of his bow. His
companion seemed to be acting the part of spectator.
“Two can play at that game!” muttered Alden, bringing the rifle of
Dick Lightfoot to his shoulder and sighting at the miscreant. He had
noticed the straggling black hair of his foe, which dangled about his
shoulders, his naked chest and deerskin shirt. He was of squat form,
sturdy and enduring of frame, and a foe not to be despised by
anyone.
Thus it came about that he and Alden Payne were aiming at each
other at the same moment. That which followed was unprecedented
in its way. The youth pulled trigger an instant before the other let fly.
Had Alden possessed his own gun, he would have brought down the
redskin, for the distance was not great, and we remember he was a
fine marksman, but the new weapon did not feel precisely like the
one to which he was accustomed. The two had not become fitted to
each other.
As it was, the bullet struck the forearm of the Indian and inflicted
a sharp wound. It was the arm which was grasping the middle of the
bow, and the hurt caused an involuntary twitch that spoiled the aim
of the archer. The arrow, instead of speeding straight for the heart
of the youth, whizzed high in air, circled grotesquely over and struck
a rock fifty feet away from him. It was a lucky escape, and Alden
lost not a second in taking advantage of it.
Throwing his head forward on the neck of his pony, he yanked the
reins and called:
“Go it, old fellow!”
The creature understood. He leaped twenty feet, as if he had been
hurled from a springboard and away he sped.
It is more than probable that the second Indian launched an arrow
after the skurrying horseman, though Alden Payne had no means of
knowing. A grim fancy came to the youth that if his enemy had done
so, the pony outran the missile.
A brief dash carried Alden beyond sight of his enemies, though he
was likely to encounter others. He partly straightened up in his
saddle and looked to the right and left. With relief unspeakable, he
suddenly debouched from the broad gorge he had been following,
into a wide plateau. On the right, it wound to the foothills a long
distance away and stretched as far as the vision could reach to the
left. Some three or four miles straight ahead, the comparatively level
plain swept until it entered the hills again, beyond which could be
seen the snowy peaks of a lofty mountain range.
The plateau must not be looked upon as a smooth plain, for here
and there it took a rolling form with arroyos and occasionally
boulders that had to be skirted, but, compared with most of the
country to the rear, it was an ideal course for a horse and his rider.
And how the pony did go! With a snort he flirted his head, as if he
would shake off everything that held him back as easily as he blew
aside the fleck of foam that alighted like a snowflake on the knee of
his rider. With nose outstretched, mane and tail flying, and the play
of each muscle like the working of a splendid machine, he flung the
miles to the rear with a rapidity that was almost incredible.
Almost in the same instant that the pony’s hoofs hit the plateau,
the graceful limbs struck an astounding speed. Alden had no means
of knowing the rate attained, but it must have been twenty-five
miles an hour. It seemed more than bone and muscle could hold,
and yet such was the animal’s perfection of form that he showed no
apparent increase of effort. The still air was fanned into a gale which
cut the face of the rider and made him contract his eyelashes and
catch his breath. He did not try to restrain the peerless steed, for the
animal, not Alden, was now the master.
“I can understand what poor Dick Lightfoot meant when he said
he enjoyed this life more than anything else in the world,” thought
Alden as his blood danced. “What delight this would be if the pony
could keep it up for hours.”
And he would have done it had the ground continued favorable. It
was through such seizure of chances that the wonderful system of
the Pony Express Riders amazed the country throughout the months
the service lasted, until the telegraph and afterward the railway put
it out of business.
Alden kept up the policy of leaving everything to the pony. The
reins dangled loose upon the moist satin neck, and the rider did not
speak. Looking down at the stony ground he now and then caught
glimpses of hoof prints, showing that others had traveled the way
before him. Generally the path as it might be called was so wide that
only now and then did the ponies travel in one another’s footsteps.
Alden reflected that the distance from his starting point to the
next station westward was eight miles or so. He calculated that it
would be covered in the course of the next half hour, always
provided no “obstacle” was encountered.
“No matter how fast we go, this mail must be late; there is no
making up the time already lost.”
Obeying that instinct which often touches reason in the horse,
Dick slackened his speed of his own accord, as he approached the
boundary of the plateau where the ground not only became rougher
but inclined upward at a rather stiff grade. Still his gait was a run,
and swifter than is often seen. So long as he could maintain it he
would do so.
The long summer afternoon was drawing to a close, but Alden
ought to reach the station well before sunset. As he figured it he
would change horses there, cover another run of about a dozen
miles, change again and complete his task at a point something over
thirty miles from where Dick Lightfoot had begun it.
This was on the supposition that the men connected with the
service would permit the youth to finish the task he had voluntarily
taken upon himself. It would seem that they would forbid the
innovation, when all the circumstances are remembered, but that
remained to be seen. Sufficient unto the hour was the work before
him.
With the slackening of pace, Alden scanned the ground in front.
The course did not lead between cliffs and high precipices, as was
the case where he began his journey, but it was as if the same
plateau had taken an upward slope and gained many more boulders
and masses of rock in doing so. A horse might keep straight on or
swerve to the right or left. There seemed to be any number of
routes.
For the first time the youth interfered with the pace of his animal.
Certain that he would exhaust himself by running up the slope,
Alden pulled gently on the rein. The pony flirted his head impatiently
and refused to put on the brakes.
“Your nerve will kill you,” said the rider, resigning the attempt for
the moment.
The incline grew steeper. Alden pulled harder and the pony
dropped to a walk, but plainly he did not like it.
“No use, Dick; I shan’t let you kill yourself; you forget that I’m
heavier than your late master and it is cruelty to allow you to gallop
up hill.”
The rocks became so plentiful that the rider could not see far
ahead or on either hand. He reflected that the neighborhood must
be a tempting one to redskins or road agents, for the latter class of
criminals was one of the pests of overland travel in the early days.
Less than half a mile to the left and in advance, rose a range or
spur to the height of several hundred feet. It swept round to the
northward, so that if the rider kept straight on, he must cross it, or
make a long detour to the northeast.
With Dick on a walk, Alden scanned each point of the compass,
not forgetting the instruction of Shagbark always to look to the rear,
for in that part of the world, danger comes from one direction as
often as from the other.
While scrutinizing the ridge which showed a considerable growth
of dwarfed pine, Alden was startled to observe a thin column of
smoke issuing from a point on the crest. The bluish vapor climbed
straight up into the clear sky, where it slowly dissolved. Its course
showed that not the slightest breeze was blowing.
“It looks like an Indian signal,” he thought; “I wonder if it has
anything to do with me.”
He brought his binocular to the front and raised it to his eyes.
Little resulted from the action. The fire which caused the vapor was
burning behind a rock, beyond reach of the glass. He could not catch
the faintest sight of it.
The natural supposition was that if this finger of smoke was a
signal from one party of red men to another, something would show
in the nature of a reply. He swept every point of the horizon with the
instrument, but that which he dreaded to see he did not discover.
Still this fact might signify nothing.
Alden could not rid himself of the fear that the signal referred to
him. Its precise meaning was beyond guessing. Shagbark might
have solved the puzzle, but his young friend could not.
“There may be a party of Indians camping on my trail and this is
to let them know where they will find me. Perhaps it tells them they
needn’t bother, for those in front have fixed things so as to gather
me in; or possibly—but what’s the use?” he demanded impatiently,
realizing that it was worse than useless to launch out upon such a
sea of speculation.
The pony showed a wish to resume his gallop, even though the
incline continued, but his rider would not permit.
“I may be wrong,” he reflected, “but I’m too merciful—”
To his amazement, Dick at that moment suddenly came to a full
stop. Not only that, but he threw up his head, thrust his ears
forward and snorted. He had made some alarming discovery. What
could it be?
The startled Alden glanced ahead. The rocks and boulders still cut
off his view, and he could not see clearly for a hundred yards in any
direction.
The signs of alarm on the part of the pony increased. He snorted
louder and began backing, showing an inclination to whirl about and
dash off. Alden patted his neck and spoke soothingly, but could not
quiet him.
“He knows a good deal more than I do,” said the youth to himself.
Then, yielding to an impulse natural in the circumstances, Alden
deftly slipped from the saddle and ran a few paces to the nearest
rock behind which he crouched. The pony thus relieved of his
burden, swung around as if on a pivot and dashed toward the
plateau.
“He scented a party of Indians; they will be here in a minute or
two. Heavens! how came I to overlook it?”
The exclamation was caused by the discovery that after firing at
the dusky archer in the ravine, he had neglected to reload his rifle, a
piece of forgetfulness for which Shagbark never would have forgiven
him.
Alden drew a bullet from his pouch with which to repair the
blunder, and then when he tried to force it down the muzzle, he
made a terrifying discovery. He had failed to take the pouch from the
body of Dick Lightfoot. His own bullets were too large for the bore of
the smaller weapon, which was of no more use to him than a stick
of wood!
CHAPTER XV
NOW FOR THE MAIL STATION

N o wonder Alden Payne was rattled. Who wouldn’t be thrown into


a panic by the discovery of his helplessness in so dangerous a
situation?
Moreover, Dick Lightfoot’s revolver was with his body. Still the
youth had his own small weapon which he carried at his hip, where
he could draw it the instant needed. Besides this he had his hunting
knife, which would be of little help in the circumstances. He might
do something in the way of defense with his pistol, but of what avail
against a party of Indians armed with rifles, or possibly bows and
arrows? All they would have to do would be to remain beyond his
range and “snipe” him at their leisure.
The only desperate hope which flashed upon him was that the red
men had not seen him leap from the saddle and dash for the
boulder. But even in that case, they could not fail to notice that the
pony was riderless and they would understand why.
He tried to force the bullet down the barrel of the gun. In vain;
then he savagely strove to chew it down to the right size. If he
succeeded with one missile before he could compress a second into
shape the crisis would be upon him.
He had just inserted the metal between his molars in the
despairing effort to reduce the size of the same, when his hair
almost lifted the hat from his head. From the direction of the trail
came a guttural whoofing sound, its repetition showing that the
cause was drawing nearer.
Before he could guess what the curious noise meant his eyes told
him the truth. An enormous bear, dark in color, came swinging
forward from the direction of the ridge. His waddling, lumbering gait,
and his vast bulk left no doubt of his identity. In any circumstances
he would have been a most formidable foe to meet.
“It’s a grizzly!” whispered Alden, shrinking behind the boulder so
low that only by taking off his hat was he barely able to peer over.
In one sense the discovery was a relief, for it explained the panic
of the pony. Better a dozen grizzly bears than half as many Indians.
Alden’s belief was that the monstrous animal would keep on with
his ponderous gait in the grotesque attempt to overtake the fleet
footed horse which was safe beyond his reach; but to the
consternation of the watcher the brute halted at the very spot where
the fugitive had landed when he dropped from the saddle. He
snuffed the ground as if he suspected the truth.
“By gracious!” gasped Alden, who now lowered his head and
peeped round the side of the boulder, “he has scented me.”
It did have that look and dropping his rifle, he drew his revolver.
“I wonder if he will mind a little thing like this. Shagbark said it
took several rifle bullets to slay a grizzly. If that’s so, he’ll laugh at
my weapon, but he’ll have to move lively if he beats me dodging
round this rock.”
The scent of the ursus species is by no means as fine as that of
many other animals, but this one unquestionably was on the track of
something and it looked very much as if that something was an
American youngster crouching behind a boulder a few rods off and
scared almost out of his wits.
The bear suddenly raised his head and dipped his snout forward in
several directions one after the other, snuffing as if he knew
something was in the wind. Back and forth the huge front swayed
until in a minute or two it remained pointed directly at the boulder!
It suggested an immense canine that had flushed its game.
“No use; he’s after me!” decided Alden, who now glanced about in
quest of a tree which he might climb. Afraid even to peer around the
edge of his hiding place, lest he should betray himself, he drew back,
grasped his revolver and held his breath as he listened with all the
intentness at his command.
For a few seconds he did not hear the slightest sound. His heart
fluttered with renewed hope. The beast must be moving off.
Probably he had caught sight of the pony and was making after him.
“He can’t know I’m here; all I have to do is to wait.”
Uneasy over the stillness, Alden slowly straightened up until he
could once more look over the top of the boulder. Could he believe
his eyes? The bear was not ten paces distant and swinging straight
toward him! The fact that just then he emitted another of his
whiffing grunts made it appear that he had seen the youngster and
was congratulating himself upon the certainty of a dainty tidbit for
supper.
Alden had to decide quickly, for in another minute the gigantic
brute would be upon him. His decision was to wait until only the
breadth of the boulder separated them and then blaze away with all
the chambers of his pistol in instant succession. He would aim at the
eyes and head, and would not miss with a single bullet. That would
check him for a few moments if the discharge did not bowl him over.
The interval thus gained would be improved by the young man to
the utmost. He would make a lightning-like change of base in the
hope of securing a better refuge.
It was a splendid pose that the youth took in the same minute.
The rifle lay on the ground, and his right arm rested on the surface
of the rock which was as high as his shoulders. The main weight of
his body was supported on his right foot which was advanced like a
runner about to start on a race. The left arm hung to his hip while
the other lay on the top of the rock, and was extended full length,
the hand closed around the butt of a revolver which was leveled at
the mountainous brute, lumbering heavily forward with his head
swinging from side to side. His piggish eyes were fixed upon the
brave lad who saw the horrid front, the great red jaws parted, the
slobbering tongue lolling out and the teeth showing. He had
discovered his prey and was going for it with unshakable resolution.
The next instant it was bang, bang—five times in succession, and
the metal cones buried themselves in that bulk as if it were a
colossal cushion. That the missiles did harm was beyond question,
but they did not stop the advance of the bear. The wounds would
likely prove mortal sooner or later, but not soon enough to save
Alden Payne.
He was on the point of wheeling and dashing off, with no clear
idea of the direction to take, when another report rang out. It was
that of a rifle, whose bullet went straight to the seat of life. With a
snarling growl, the bear reared on his hind legs and clawed at the
wounds made by the revolver bullets, as if he thought they were
splinters which he tried to pluck out.
It was the rifle ball that settled the business. He sagged over on
his side, struck and kicked for a few seconds and then the prodigious
carcass lay still, for he was as dead as Julius Cæsar.
From the same direction that the bear had come, advanced a Pony
Express Rider, with smoking rifle in hand. He had arrived in the nick
of time and could not have asked a fairer target than that presented
by the brute. The man, however, did not know whom he had saved,
until Alden Payne came from behind the boulder and confronted
him. Then he reined up and looked wonderingly at the youth.
“Who the mischief are you?” he asked, as Alden appeared.
“A young fellow in need of the help you gave.”
“How comes it you’re on foot and in this fix?”
Alden hastily explained.
“So Dick Lightfoot’s dead, eh? Too bad; where did you leave him?”
“Two or three miles back; he was shot from his pony by an Indian
arrow.”
“Where’s his pony?”
“He made off when I sprang from the saddle and hid here.”
“Umph! never run from a bear like that.”
“I never met a grizzly before.”
“And you didn’t meet one this time: only an ordinary black bear.
Why didn’t you use your rifle?” asked the rider, with a glance at the
weapon on the ground.
“My bullets don’t fit.”
The horseman scrutinized the gun.
“Why it’s Dick’s; you didn’t think to take his bullets; I can let you
have a few; you may need ’em before you reach the station.”
He deftly extracted a half dozen which he passed to the grateful
Alden.
“Don’t lose any time in reloading, which reminds me.”
And he proceeded to recharge his own weapon.
During this brief chat, it struck Alden that the man resembled in
looks and voice the rider who lay on the ground several miles away.
The alert manner and crisp way of speaking were the same.
“You are about the weight of Lightfoot and have much his
appearance.”
“Umph! I ought to; I’m his brother.”
He snatched out a small watch and glanced at it.
“I’ll be hanged! I’ve lost six minutes; I must be off; bye-bye.”
He touched the flanks of his pony with his spurs, and the animal
bounded away at full speed. Almost immediately he disappeared.
To put it mildly, Alden Payne was surprised. Here was a man who
received the news of his brother’s death without a sign of emotion,
and yet doubtless he felt it deeply. But it was all a part of the game.
The living brother might pass over the Great Divide in a brief while
and join the other. Such was the life of the Pony Express Rider.
Alden would have liked to ask the man more questions, had time
permitted. He would have turned over the possessions taken from
the fallen man, had he thought of it. He wished to ask him about
that signal smoke which still stained the sky in front and the rider
could have given him valuable suggestions.
It was too late now. The opportunity was gone and the youth
must think for himself. Six or eight miles remained to be traversed
through a dangerous country and he was on foot. The pony had fled
and he doubted whether he could be recovered.
“He has the mail with him and may take it into his head to go to
the station without me,” was the thought of Alden, as he turned
back over the trail. The hoof prints left by the animal showed clearly
in the ground and it was easy to follow them.
A little way and he came to where the open space broadened. His
vision widened and the first survey showed him Dick quietly cropping
the grass, as if nothing unusual had happened to him. His side was
toward Alden, who whistled.
The pony lifted his head, with the blades of grass dripping from
his jaws, and looked questioningly at the youth, who whistled again
and walked in his direction.
It would be interesting could we know what whims passed
through the brain of the animal which was one of the most
intelligent of his species. The Express Riders used so many horses
and were forced by circumstances to shift so often from one to the
other, that not often was any special affection formed between the
human and brute. In other instances, the fondness was deep and
the two stuck to each other whenever and wherever it was possible
to do so.
Dick in his own way must have mourned the loss of his master
when he tumbled from the saddle, but he accepted the substitute in
the minute that he appeared, and yielded the same obedience to
one as to the other. Brief as had been the pony’s service, he like his
companions, had imbibed the fact that his one duty in life was to
carry the mail pouches with the highest speed at his command, and
that such service was to be performed under the guidance of the
man who sat on his back.
When Dick, therefore, heard the whistle and recognized the youth,
he paused only long enough to make sure there was no mistake,
and then with a neigh of pleasure, he trotted toward him. As the two
met, Alden patted the animal’s nose and spoke affectionately:
“Good Dick! you’re worth your weight in gold; I should be in a bad
fix without you.”
He sprang into the saddle. He had hardly settled in his seat when
the pony broke into a trot, which quickly rose to a gallop, though it
was not a dead run. That would come very soon.
The observant Alden noted one fact: the horse did not take the
course which he was following when alarmed by the approach of the
black bear. He veered well to the left, thus leaving the carcass out of
sight in the other direction. His kind dread a dead bear almost as
much as a live one.
The action of Dick confirmed what his new master had suspected
from the first: the route to the station was not over a single, narrow
trail to which the riders confined themselves, but covered an area
that gave wide latitude. That he took the path which was taken by
the man who saved him from the bear was one of those providential
occurrences that are more common in this life than most people
believe.
The emigrant trains were disposed to keep to certain paths, where
the face of the country compelled a closing in, but in other sections
the respective courses were separated by miles, and, as has been
shown the parties plodding across the plains, even though their
routes were parallel, were often so far apart that for days they saw
nothing of one another. Even the twinkle of their camp fires were too
far over the “convex world,” to be visible.
Alden Payne could not free himself from the belief that it was safer
to hold Dick down to a moderate pace than to give him free rein.
The mail was already hopelessly behind time,—a fact which did not
concern him—though he was determined to deliver it at the station if
it were possible for him to do so. This could be done before dark
with the pony on a trot or walk.
The feeling of the young Express Rider was natural. When drawing
near a point where danger is suspected, we prefer to do so at the
most guarded pace. With all of Dick’s sagacity he was more likely to
go wrong when on a run than when on a walk.
The animal must have felt much as did the trained dog, who,
having pointed a bird, was picked up by his new and sympathetic
master and carried off the field, under the belief that he had been
suddenly taken with cramps. Dick gathered his hoofs several times
and broke into an impatient gallop, only to be drawn down again to
a trot which finally dropped to a rapid walk. He gave up the dispute
in disgust and by his action said:
“All right; if you think you know more than I do, you may run
things.”
It did not add to Alden’s serenity of mind to notice that the course
was gradually shifting to the left, and finally led directly toward the
brush of smoke which still stained the blue tinted sky.
All manner of thoughts crowded upon him. The one hopeful truth
was that the living Lightfoot had come over the route unharmed
within the last hour. It would seem that Alden ought to be as
fortunate as he. Ah! if he had only had time to question the rider
who might have passed through a brush with the redskins!
Another fact gave basis for vague hope: a scrutiny of the whole
horizon showed no answering signal. When Indians resort to such
telegraphy, as they often do on the plains and among the
mountains, there are calls and replies. It is on record that on one
occasion the news of the signing of an important treaty at
Washington affecting the Sioux was known to that tribe before the
telegraphic messages could reach the army officers at the
reservation. It was carried westward by Indian telegraphy which
none of us fully understands, except that it seems to be through
signal fires from elevated positions. But in that case, there must
have been smoke or blaze visible at different points, as we know
was really the case.
But Alden Payne saw only the shadowy wisp of vapor in front of
him, and must wait to learn its full meaning. That knowledge could
not be long in coming.
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!

ebooknice.com

You might also like