Begin To Code With Python Rob Miles All Chapter Instant Download
Begin To Code With Python Rob Miles All Chapter Instant Download
com
https://textbookfull.com/product/begin-to-code-
with-python-rob-miles/
https://textbookfull.com/product/begin-to-code-with-javascript-1st-
edition-miles/
textbookfull.com
https://textbookfull.com/product/math-adventures-with-python-an-
illustrated-guide-to-exploring-math-with-code-1st-edition-peter-
farrell/
textbookfull.com
https://textbookfull.com/product/mastering-large-datasets-with-python-
parallelize-and-distribute-your-python-code-1st-edition-john-t-
wolohan/
textbookfull.com
https://textbookfull.com/product/atomic-force-microscopy-methods-and-
protocols-nuno-c-santos/
textbookfull.com
The Gumilev Mystique Biopolitics Eurasianism and the
Construction of Community in Modern Russia 1st Edition
Mark Bassin
https://textbookfull.com/product/the-gumilev-mystique-biopolitics-
eurasianism-and-the-construction-of-community-in-modern-russia-1st-
edition-mark-bassin/
textbookfull.com
https://textbookfull.com/product/suicide-through-a-peacebuilding-lens-
katerina-standish/
textbookfull.com
https://textbookfull.com/product/guidance-and-counselling-in-schools-
theory-and-practice-1st-edition-namita-ranganathan-toolika-wadhwa/
textbookfull.com
https://textbookfull.com/product/bridging-the-communication-gap-in-
science-and-technology-lessons-from-india-1st-edition-pallava-bagla/
textbookfull.com
https://textbookfull.com/product/american-messiahs-false-prophets-of-
a-damned-nation-first-edition-morris/
textbookfull.com
Novel Sensors and Sensing First Edition Jackson
https://textbookfull.com/product/novel-sensors-and-sensing-first-
edition-jackson/
textbookfull.com
Begin to Code with Python
Begin
to Code
Start writing software that solves real problems, even if you have
• For absolute beginners who’ve never
absolutely no programming experience! This friendly, easy, full-color
written a line of code
book puts you in total control of your own learning, empowering you to
build unique and useful programs. Microsoft has completely reinvented • For anyone who’s been frustrated with
the beginning programmer’s tutorial, reflecting deep research into other beginning programming books
how today’s beginners learn, and why other books fall short. Begin to or courses
Code with Python is packed with innovations, from its “Snaps” prebuilt • For people who’ve started out with
operations to its “Make Something Happen” projects. Whether you’re other languages and now want to
with
a total beginner or you’ve tried before, this guide will put the power, learn Python
excitement, and fun of programming where it belongs: in your hands! • Works with Windows PC, Apple Mac,
Linux PC, or Raspberry Pi
Easy, friendly, and you’re in control! Learn how to… • Includes mapping of MTA exam
Python
objectives that are covered in this book,
• Get, install, and use powerful free tools to create modern Python
programs as well as an appendix with further
explanation of some of the topics
• Learn key concepts from 170 sample programs, and use them to
on the exam
jumpstart your own
• Discover exactly what happens when a program runs
• Approach program development with a professional perspective About the Author
• Learn the core elements of the Python language
Rob Miles has taught computer
• Build more complex software with classes, methods, and objects
programming for over 30 years.
• Organize programs so they’re easy to build and improve A Microsoft MVP for Windows
• Capture and respond to user input Development, Rob enjoys inspiring
• Store and manipulate many types of real-world data programmers at all levels. He writes his
• Define custom data types to solve specific problems own games, programs, and poetry, has
consulted on many commercial software
• Create interactive games that are fun to play
projects, and is the author of Begin to
• Build modern web and cloud-based applications
Code with C#.
• Use pre-built libraries to quickly create powerful software
9 781509 304523
Rob Miles
Rob Miles
BEGIN TO CODE WITH PYTHON Editor-in-Chief
Published with the authorization of Microsoft Corporation by: Greg Wiegand
Pearson Education, Inc.
Senior Acquisitions Editor
Copyright © 2018 by Pearson Education, Inc. Laura Norman
All rights reserved. Printed in the United States of America. This Development Editor
publication is protected by copyright, and permission must be Rick Kughen
obtained from the publisher prior to any prohibited reproduction,
Managing Editor
storage in a retrieval system, or transmission in any form or by
Sandra Schroeder
any means, electronic, mechanical, photocopying, recording, or
likewise. For information regarding permissions, request forms, Senior Project Editor
and the appropriate contacts within the Pearson Education Global Tracey Croom
Rights & Permissions Department, please visit www.pearsoned.com/
Copy Editor
permissions/. No patent liability is assumed with respect to the use
Dan Foster
of the information contained herein. Although every precaution has
been taken in the preparation of this book, the publisher and author Indexer
assume no responsibility for errors or omissions. Nor is any liability Valerie Haynes Perry
assumed for damages resulting from the use of the information
Proofreader
contained herein.
Becky Winter
ISBN-13: 978-1-5093-0452-3
Technical Editor
ISBN-10: 1-5093-0452-5
John Ray
Library of Congress Control Number: 2017958202
Editorial Assistant
1 17
Cindy J Teeters
TRADEMARKS
Cover Designer
Microsoft and the trademarks listed at http://www.microsoft.com on
Twist Creative, Seattle
the “Trademarks” webpage are trademarks of the Microsoft group of
companies. All other marks are property of their respective owners. Compositor
"Python" and the Python logos are trademarks or registered trade- Danielle Foster
marks of the Python Software Foundation, used by Pearson Education
with permission from the Foundation.
WARNING AND DISCLAIMER
Every effort has been made to make this book as complete and as
accurate as possible, but no warranty or fitness is implied. The infor-
mation provided is on an “as is” basis. The author, the publisher, and
Microsoft Corporation shall have neither liability nor responsibility
to any person or entity with respect to any loss or damages arising
from the information contained in this book or from the use of the
programs accompanying it.
SPECIAL SALES
For information about buying this title in bulk quantities, or for
special sales opportunities (which may include electronic versions;
custom cover designs; and content particular to your business,
training goals, marketing focus, or branding interests), please contact
our corporate sales department at corpsales@pearsoned.com or
(800) 382-3419.
For government sales inquiries, please contact
governmentsales@pearsoned.com.
For questions about sales outside the U.S., please contact
intlcs@pearson.com.
To Mary
About the
author
Rob Miles has spent more than 30 years teach-
ing programming at the University of Hull in
the United Kingdom. He’s a Microsoft MVP,
with a passion for programming, and creating
new things. If he had any spare time, he’d spend
it writing even more code. He loves making
programs and then running them to see what
happens. He reckons that programming is the
most creative thing you can learn how to do.
He believes that programmers really can claim to be building the future.
He claims to know a lot of really good jokes, but nobody has ever heard
him tell one. If you want an insight into the Wacky World™ of Rob Miles,
you can read his blog at www.robmiles.com and follow him on Twitter via
@RobMiles.
rob@robmiles.com
Contents at a glance
Part 1: Programming fundamentals
Chapter 1 Starting with Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Chapter 2 Python and Programming . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 3 Python program structure . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Chapter 4 Working with variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Chapter 5 Making decisions in programs . . . . . . . . . . . . . . . . . . . . . . 104
Chapter 6 Repeating actions with loops . . . . . . . . . . . . . . . . . . . . . . . 140
Chapter 7 Using functions to simplify programs . . . . . . . . . . . . . . . 170
Chapter 8 Storing collections of data . . . . . . . . . . . . . . . . . . . . . . . . . 210
Give us feedback
Tell us what you think of this book and help
Microsoft improve our products for you.
Thank you!
http://aka.ms/tellpress
vii
Programming and problems . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Programmers and people . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Computers as data processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Machines and computers and us . . . . . . . . . . . . . . . . . . . . . . . 22
Programs as data processors . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Python as a data processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Data and information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Work with Python functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
The ord function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
The chr function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Investigate data storage using bin . . . . . . . . . . . . . . . . . . . . . 39
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
viii
4 Working with variables . . . . . . . . . . . . . . . . . . . . . . . . 72
Variables in Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Python names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Working with text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Marking the start and end of strings . . . . . . . . . . . . . . . . . . . . 81
Escape characters in text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Read in text using the input function . . . . . . . . . . . . . . . . . . 84
Working with numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Convert strings into integer values . . . . . . . . . . . . . . . . . . . . . . 87
Whole numbers and real numbers . . . . . . . . . . . . . . . . . . . . . 89
Real numbers and floating-point numbers . . . . . . . . . . . . . 90
Convert strings into floating-point values . . . . . . . . . . . . . . 95
Perform calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Convert between float and int . . . . . . . . . . . . . . . . . . . . . . . 98
Weather snaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
ix
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Testing user input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Complete the program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Input snaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
x
Convert our functions into a Python module . . . . . . . . . . . 201
Use the IDLE debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
xi
Use lists as lookup tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
xii
10 Use classes to create active objects . . . . . . . . . . . . 308
Create a Time Tracker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Add a data attribute to a class . . . . . . . . . . . . . . . . . . . . . . . . . 311
Create a cohesive object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Create method attributes for a class . . . . . . . . . . . . . . . . . . . . 314
Add validation to methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Protect a data attribute against damage . . . . . . . . . . . . . . 328
Protected methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Create class properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Evolve class design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Manage class versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
The __str__ method in a class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Python string formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Session tracking in Time Tracker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
The Python map function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
The Python join method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Make music with Snaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
xiii
Design with classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Python sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Sets and tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
Sets versus class hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
xiv
Part 3: Useful Python (Digital-only)
xv
Create a Listbox selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
An application with a graphical user interface . . . . . . . . . 544
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
xvi
Create game sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
Add a player sprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
Control the player sprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
Add a Cracker sprite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Add lots of sprite instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
Catch the crackers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Add a killer tomato . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
Complete the game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
Add a start screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
End the game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Score the game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
What you have learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
Index
xvii
Introduction
Programming is the most creative thing you can learn how to do. Why? If you learn to
paint, you can create pictures. If you learn to play the violin, you can make music. But
if you learn to program, you can create entirely new experiences (and you can make
pictures and music too, if you wish). Once you’ve started on the programming path,
there’s no limit to where you can go. There are always new devices, technologies, and
marketplaces where you can use your programming skills.
Think of this book as your first step on a journey to programming enlightenment. The
best journeys are undertaken with a destination in mind, and the destination of this
journey is “usefulness.” By the end of this book, you will have the skills and knowledge
to write useful programs.
However, before we begin, a small word of warning. Just as a guide would want to tell
you about the lions, tigers, and crocodiles that you might encounter on a safari, I must
tell you that our journey might not be all smooth going. Programmers must learn to
think slightly differently about problem solving, because a computer just doesn’t work
the same way humans do. Humans can do complex things rather slowly. Computers
can do simple things very quickly. It is the programmer’s job to harness the simple
abilities of the machine to solve complicated problems. This is what you’ll learn to do.
The key to success as a programmer is much the same as for many other endeavors.
To become a world-renowned violin player, you will have to practice a lot. The same
is true for programming. You must spend a lot of time working on your programs to
acquire code-writing skills. However, the good news is that just as a violin player really
enjoys making the instrument sing, making a computer do exactly what you want
turns out to be a very rewarding experience. It gets even more enjoyable when you
see other people using programs that you’ve written and finding them useful and
fun to use.
xviii Introduction
Part 1: Programming fundamentals
The first part gets you started. It points you to where you’ll install and use the pro-
gramming tools that you’ll need to begin coding, and it introduces you to the fun-
damental elements of the Python programming language. You’ll come to grips with
writing your first programs and learn all the fundamental code constructions that
underpin all programs. You’ll also find out where Python fits in the great scheme of
programming languages, and what this means for you as a programmer.
The third part of the book is provided as a downloadable document that you can have
open on your desktop as you experiment with the demonstration programs and cre-
ate applications of your own. The chapter PDF files for this Part are available at
https://aka.ms/BeginCodePython/downloads
Introduction xix
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
You can read the book straight through if you like, but you’ll learn much more if you
slow down and work with the practical parts along the way. Like learning to ride a
bicycle, you’ll learn by doing. You must put in the time and practice to learn how to do it.
But this book will give you the knowledge and confidence to try your hand at program-
ming, and it will also be around to help you if your programming doesn’t turn out as you
expected. Here are some elements in the book that will help you learn by doing:
Yes, the best way to learn things is by doing, so you’ll find “Make Something Happen” ele-
ments throughout the text. These elements offer ways for you to practice your programming
skills. Each starts with an example and then introduces some steps you can try on your own.
Everything you create will run on Windows, macOS, or Linux.
CODE ANALYSIS
A great way to learn how to program is by looking at code written by others and working out
what it does (and sometimes why it doesn’t do what it should). This book contains over 150
sample programs for you to examine. In this book’s “Code Analysis” challenges, you’ll use your
deductive skills to figure out the behavior of a program, fix bugs, and suggest improvements.
If you don’t already know that programs can fail, you’ll learn this hard lesson soon after you
begin writing your first program. To help you deal with this in advance, I’ve included “What
Could Go Wrong?” elements, which anticipate problems you might have and provide solu-
tions to those problems. For example, when I introduce something new, I’ll sometimes spend
some time considering how it can fail and what you need to worry about when you use the
new feature.
xx Introduction
PROGRAMMER’S POINTS
I’ve spent a lot of time teaching programming. But I’ve also written many programs and sold a few to
paying customers. I’ve learned some things the hard way that I really wish I’d known at the start. The aim
of “Programmer’s Points” is to give you this information up front so that you can start taking a profes-
sional view of software development as you learn how to do it.
“Programmer’s Points” cover a wide range of issues, from programming to people to philosophy. I strongly
advise you to read and absorb these points carefully—they can save you a lot of time in the future!
Using a PC or laptop
You can use Windows, macOS, or Linux to create and run the Python programs in the
text. Your PC doesn’t have to be particularly powerful, but these are the minimum
specifications I’d recommend:
●● 256 GB hard drive space. (The full Python and Visual Studio Code installations take
about 1 GB of hard drive space.)
There are no specific requirements for the graphics display, although a higher-
resolution screen will enable you to see more when writing your programs.
Introduction xxi
Using a Raspberry Pi
If you want to get started in the most inexpensive way possible, you can use a Rasp-
berry Pi running the Raspbian operating system, which has Python 3.6 and the IDLE
development environment built in.
Downloads
In every chapter in this book, I’ll demonstrate and explain programs that teach you
how to begin to program—and that you can then use to create programs of your own.
You can download this book’s sample code from the following page:
https://aka.ms/BeginCodePython/downloads
Follow the instructions you’ll find in Chapter 1 to install the sample programs and code.
Acknowledgments
I would like to thank Laura Norman for giving me a chance to write this book, Dan
Foster and Rick Kughen for putting up with my prose and knocking it into shape,
John Ray for astute and constructive technical insights, and Tracey Croom and Becky
Winter for making it all look so nice. I’d also like to say thanks to Rob Nance for all the
lovely artwork.
Finally, I’d like to say thanks to my wife, Mary, for her support and endless cups of tea.
And biscuits.
https://aka.ms/BegintoCodePython/errata
If you discover an error not already listed, please submit it to us at the same page.
xxii Introduction
If you need additional support, email Microsoft Press Book Support at
mspinput@microsoft.com
Please note that product support for Microsoft software and hardware is not offered
through the previous addresses. For help with Microsoft software or hardware, go to
http://support.microsoft.com
https://www.microsoft.com/en-us/learning/exam-98-381.aspx
To help you get the best out of this text, if you’re thinking of using it as part of a pro-
gram of study to prepare for this exam, I’ve put together a mapping of exam topics to
book elements that you may find helpful. (Note that these mappings are based on the
exam specification as of October 2017.)
I’ve also created an appendix, which puts some of the elements described in the book
into the context of the exam, and you can find this in the same place as the sample
code downloads.
https://aka.ms/BeginCodePython/downloads
Qualification structure
The qualification is broken down into a number of topic areas, each of which com-
prises a percentage of the total qualification. We can go through each topic area
and identify the elements of this book that apply. The tables below map skill items to
sections in chapters of this book.
Introduction xxiii
Perform operations using data types and operators
(20-25%)
To prepare for this topic, you should pay special attention to Chapter 4, which
describes the essentials of data processing in Python programs as well as how text and
numeric data is stored and manipulated. Chapter 5 introduces the Boolean variable
type and explains how logical values are manipulated. Chapter 8 describes how to
store collections of data, and Chapter 9 explains the creation and storage of data
structures. Chapter 11 gives details of sets in Python programs.
xxiv Introduction
Random documents with unrelated
content Scribd suggests to you:
herpaannuksen valtaan — hän ei mitenkään uskaltanut mennä
pikimustan metsän läpi; mutta jalat veivät hänet edelleen, eikä hän
voinut kääntyä. Hänen ruumiinsa tuntui vieraalta, hän kulki
eteenpäin aivan kuin unessa. Hän astui varmasti kivien ja juurien ja
vesilätäköiden yli, varoen vaistomaisesti kompastumista, joutumista
pois tasaisesta astuntatahdistaan ja jättäytymistä pelon valtaan.
Kristiinan silmät olivat jo niin tottuneet pimeään, että kun hän tuli
ulos metsästä, hän erotti veden välkkeen joessa ja soissa. Vainiot
piirtyivät esiin pimeydestä, taloryhmät näyttivät kuin pimeyden
pesiltä. Taivaskin tuntui alkavan valjeta korkealla — hän aavisti sen,
mutta ei uskaltanut nostaa katsettaan mustia jyrkkiä vuorensyrjiä
kohti. Hän tiesi pian olevan ajan, jolloin kuu nousee vuorien takaa.
Hän tiesi, että jos asia olisi koskenut jotakin hänen omaa lastaan,
ei hän olisi uskaltanut ryhtyä tähän viimeiseen keinoon. Kääntämään
Jumalan kättä, kun tämä oli ojentanut sen elävää sielua kohti.
Istuessaan omien sairastavien pikkulastensa vieressä, ollessaan nuori
ja sydämen tuskassa hän oli koettanut sanella väristen: Herra, sinä
rakastat heitä enemmän kuin minä — tapahtukoon sinun tahtosi —.
Mutta nyt hän kulki tässä uhmaten omaa pelkoaan. Tuon lapsen,
joka ei ollut hänen omansa, hän tahtoi pelastaa, odottipa tässä
elämässä mikä tahansa —.
Sillä Simon oli saanut tietää hänestä liian paljon. Kristiina oli
turvautunut hylkäämänsä miehen apuun joka kerran, kun hän itse oli
hädässä valittunsa puolesta. Hän oli kääntynyt hylkimänsä kosijan
puoleen aina, kun hän tarvitsi jotakuta suojelemaan rakkauttaan.
Eikä hän ollut vielä milloinkaan pyytänyt turhaan — kerta kerran
jälkeen oli Simon astunut hänen eteensä suojaamaan häntä
voimallaan ja hyvyydellään.
Sitten hän kapusi taas muurin yli ja alkoi laskeutua rinnettä alas.
Tie kulki melkein koko matkan tunturin varjossa. Oli alkanut tuulla
navakammin — häntä vastaan puski tuulenpuuska toisensa jälkeen.
Ne lennättivät kuihtuneita lehtiä hänen päälleen tahtoen osoittaa
hänelle tietä takaisin sinne, mistä hän oli tullut viimeksi.
*****
Simon istui tavallisella paikallaan sängyn pääpuolessa lapsen yli
kumartuneena Kristiinan aukaistessa oven ja astuessa sisään.
Silmänräpäykseksi hän kohotti katseensa — Kristiina ajatteli,
mahtoiko hän itsekin olla yhtä kuluneen ja kurjan ja vanhan
näköinen tällä hetkellä. Sitten Simon painoi kasvonsa vielä alemma
ja kätki ne hihaa vasten.
Hän otti kauhalla maitoa pikku padasta, joka oli tulella, ja vei sen
lapselle — mutta Andres oli nukkunut uudestaan. Hän näytti
nukkuvan sikeää, tervettä unta.
Silloin hän joi maidon itse. Se maistui niin hyvältä että hänen
täytyi hörppiä kolme neljä kauhallista yhteen menoon.
Kaikki, mitä hän oli ajatellut tänä yönä, oli vain yön houretta. Ei
hän ollut tehnyt tätä muun kuin sen vuoksi, ettei ollut voinut nähdä
tuon lapsen kuolevan käsiinsä.
"En."
*****
Ulkona satoi, eikä Kristiina oikein tiennyt, mikä aika yöstä oli. Poika
oli ollut puolihorroksissa, mutta ei ollut puhunut. Ja yöllä oli Andres
hänen mielestään nukkunut niin hyvin ja sikeästi, että Kristiinakin
uskalsi paneutua hiukan pitkäkseen Andreksen viereen tunteakseen
milloin poika liikahtaisi. Ja sitten hän oli vaipunut uneen.
Simon kömpi peitteen alle. Siinä oli lämmin kuoppa sillä kohtaa,
missä Kristiina oli maannut, ja tyynyllä tuntui heikko makea hiusten
lemu. Simon päästi vaikeroivan äännähdyksen — sitten hän veti
pienen poikansa puoleensa ja painoi kasvonsa sen kosteita,
pehmeitä lapsenhiuksia vasten. Poika oli käynyt niin pieneksi, että
katosi aivan olemattomiin sylissä, mutta makasi siinä tyytyväisenä ja
virkkoi silloin tällöin jonkun lapsellisen sanan.
Olisi hän tahtonut vielä toisen pojan — eikä olisi pannut vastaan,
vaikka Formoon olisi ilmestynyt useampiakin lapsia. Mutta Ramborg
oli hyvillään, kun hänen ei tarvinnut ryhtyä siihen puuhaan. Joten siis
näinkin oli hyvä. Sillä talon viihtyisyyteen vaikutti paljon Ramborgin
mieliala, sitä ei käynyt kieltäminen. Ja tällä olisi saattanut olla vähän
tasaisempi luonne. Simon ei aina tiennyt miten suhtautua
vaimoonsa. Ja talon hoidossakin, emännän tehtävissä, olisi voinut
olla parempi järjestys. Mutta eihän kukaan voi vaatia kaikkea mitä
toivoo. Näin Simon ajatteli kotiin ratsastaessaan.
*****
Isä ei ollut sanonut juuri mitään. Mutta hän oli lysähtänyt kokoon
kuin juureen iskettynä. Saattoi vieläkin tapahtua joskus, kun Simonia
pyrki nukuttamaan liian kauan aamulla, että hän näki edessään tuon
näyn ja heräsi samassa täysin selkeäksi. Isä istui kyyryssä pää rintaa
vasten ja Gyrd seisoi käsi istuimen käsipuulla, hiukan tavallista
kalpeampana, maahan luoduin silmin.
"Jumalan kiitos, ettei hän ollut täällä, kun se tuli ilmi. Hyvä, että
hän on sinun ja Halfridin luona", oli Gyrd sanonut heidän jäätyään
kahden kesken.
Tämä oli ainoa kerta, jolloin Simon oli kuullut Gyrdin kiittävän
toista naista enemmän kuin omaa vaimoaan.
Mutta hän oli nähnyt, miten Gyrd sittenkin aivan kuin kuihtui ja
painui pieneksi jouduttuaan naimisiin Helga Saksentyttären kanssa.
Siihen aikaan kun hän oli ollut sulhasmies — Gyrd ei itse puhunut
paljon omista asioistaan, mutta Simon oli nähnyt kaiken — oli hän
ollut niin säteilevän kaunis kasvoiltaan, että Simonista aivan tuntui
oudolta. Gyrd oli kertonut nähneensä Helgan jo aikaisemmin, mutta
sanoi, ettei hän ollut koskaan puhunut tämän kanssa eikä voinut
ajatella, että tämän rikkaat sukulaiset antaisivat niin rikkaan ja
kauniin morsiamen hänelle.
Sitten hän tuli kotiin. Andres tallusti jäljestä joka paikkaan minne
isä meni. Ulvhild pyöriskeli satulan ympärillä tutkien, oliko isä tuonut
hänelle tuomisia. Arngjerd kantoi esiin olutta ja ruokaa, kartanon
emäntä istuutui viereen hänen syödessään, tarinoi ja kysyi uutta.
Lasten mentyä levolle otti Simon Ramborgin polvelleen, kertoi
terveiset ja tuttujen ja sukulaisten kuulumiset.
*****
"Tiedän, että sinä olet hyvä lapsi, mutta mitä itse arvelet asiasta?"
"En arvele sitä enkä tätä omasta puolestani. Päättäkää te, rakas
isä."
"Kyllä minä pidän hänestä, minkä häntä olen nähnyt — eihän sitä
tarvitse uskoa kaikkia puheita —. Mutta päättäkää te, isä —"
*****