Python for Kids: A Playful Introduction to Programming 2nd Edition
Hello,
So, I have had the pleasure of working through this book for several months now and it was initially with my youngest who had not long turned 9.
He was working through with me until chapter 4 “Drawing with Turtles” and doing programming puzzles but the lure of his PS5 and XBOX Series X was too much for him sometimes, playing Dreams and Roblox waits for no kid.
If I am being honest, it was a bit of a long shot as he has been creating his own computer levels and platform games in both Dreams and Roblox Studio but they are a lot more visual than Python, so he has been used to a specific way of creating so far.
On the upside I seen enough to KNOW he will be back and he has told me to keep our space to come back to so that is great but we started literally like four weeks after his ninth birthday so maybe a little too soon.
BUT…
As I am trying to learn Python myself, I decided to work through it because between you and me I have ADHD and one of the struggles learning Python has been trying to keep at it and concentrate without being too distracted, a lot of programming books are a bit too bland and dry and not too engaging where I was really enjoying working through this book and decided to carry on.
I am glad I did.
The book itself has an introduction, sixteen chapters all with subsections and an afterword’s which you can see here.
INTRODUCTION
- Why Python
- How to Learn to Code
- Who Should Read This Book
- What’s in This Book
- Python for Kids Website
- Have Fun!
PART I
LEARNING TO PROGRAM
1
NOT ALL SNAKES SLITHER
- A Few Words About Language
- Installing Python
- Installing Python on Windows
- Installing Python on macOS
- Installing Python on Ubuntu
- Installing Python on Raspberry Pi (Raspberry Pi OS or Raspbian)
- Once You’ve Installed Python
- Saving Your Python Programs
- What You Learned
2
CALCULATIONS AND VARIABLES
- Calculating with Python
- Python Operators
- The Order of Operations
- Variables Are Like Labels
- Using Variables
- What You Learned
3
STRINGS, LISTS, TUPLES, AND DICTIONARIES
- Strings
- Creating Strings
- Handling Problems with Strings
- Embedding Values in Strings
- Multiplying Strings
- Lists Are More Powerful than Strings
- Adding Items to a List
- Removing Items from a List
- List Arithmetic
- Tuples
- Python Dictionaries
- What You Learned
- Programming Puzzles
- #1: Favorites
- #2: Counting Combatants
- #3: Greetings!
- #4: Multiline Letter
4
DRAWING WITH TURTLES
- Using Python’s Turtle Module
- Creating a Canvas
- Moving the Turtle
- What You Learned
- Programming Puzzles
- #1: A Rectangle
- #2: A Triangle
- #3: A Box Without Corners
- #4: A Tilted Box Without Corners
5
ASKING QUESTIONS WITH IF AND ELSE
- If Statements
- A Block Is a Group of Programming Statements
- Conditions Help Us Compare Things
- IfThenElse
- Statements
- if and elif Statements
- Combining Conditions
- Variables with No Value—None
- The Difference Between Strings and Numbers
- What You Learned
- Programming Puzzles
- #1: Are You Rich?
- #2: Twinkies!
- #3: Just the Right Number
- #4: I Can Fight Those Ninjas
6
GOING LOOPY
- Using for Loops
- While We’re Talking About Looping
- What You Learned
- Programming Puzzles
- #1: The Hello Loop
- #2: Even Numbers
- #3: My Five Favorite Ingredients
- #4: Your Weight on the Moon
7
RECYCLING YOUR CODE WITH FUNCTIONS AND MODULES
- Using Functions
- Parts of a Function
- Variables and Scope
- Using Modules
- The input functions
- What You Learned
- Programming Puzzles
- #1: Basic Moon Weight Function
- #2: Moon Weight Function and Years
- #3: Moon Weight Program
- #4: Mars Weight Program
8
HOW TO USE CLASSES AND OBJECTS
- Breaking Things into Classes
- Children and Parents
- Adding Objects to Classes
- Defining Functions of Classes
- Adding Class Characteristics
- Why Use Classes and Objects?
- Objects and Classes in Pictures
- Other Useful Features of Objects and Classes
- Inherited Functions
- Functions Calling Other Functions
- Initializing an Object
- What You Learned
- Programming Puzzles
- #1: The Giraffe Shuffle
- #2: Turtle Pitchfork
- #3: Two Small Spirals
- #4: Four Small Spirals
9
MORE TURTLE GRAPHICS
- Starting with the Basic Square
- Drawing Stars
- Drawing a Car
- Coloring Things In
- A Function to Draw a Filled Circle
- Creating Pure Black and White
- A SquareDrawing
- Function
- Drawing Filled Squares
- Drawing Filled Stars
- What You Learned
- Programming Puzzles
- #1: Drawing an Octagon
- #2: Drawing a Filled Octagon
- #3: Another StarDrawing
- #4: Four Spirals Revisited
10
USING TKINTER FOR BETTER GRAPHICS
- Creating a Clickable Button
- Using Named Parameters
- Creating a Canvas for Drawing
- Drawing Lines
- Drawing Boxes
- Drawing a Lot of Rectangles
- Setting the Color
- Drawing Arcs
- Drawing Polygons
- Displaying Text
- Displaying Images
- Creating Basic Animation
- Making an Object React to Something
- More Ways to Use the Identifier
- What You Learned
- Programming Puzzles
- #1: Fill the Screen with Triangles
- #2: The Moving Triangle
- #3: The Moving Photo
- #4: Fill the Screen with Photos
PART II
BOUNCE!
11
BEGINNING YOUR FIRST GAME: BOUNCE!
- Whack the Bouncing Ball
- Creating the Game Canvas
- Creating the Ball Class
- Adding Some Action
- Making the Ball Move
- Making the Ball Bounce
- Changing the Ball’s Starting Direction
- What You Learned
- Programming Puzzles
- #1: Changing Colors
- #2: Flashing Colors
- #3: Take Your Positions!
- #4: Adding the Paddle . . . ?
12
FINISHING YOUR FIRST GAME: BOUNCE!
- Adding the Paddle
- Making the Paddle Move
- Finding Out When the Ball Hits the Paddle
- Adding an Element of Chance
- What You Learned
- Programming Puzzles
- #1: Delay the Game Start
- #2: A Proper “Game Over”
- #3: Accelerate the Ball
- #4: Record the Player’s Score
PART III
MR. STICK MAN RACES FOR THE EXIT
13
CREATING GRAPHICS FOR THE MR. STICK MAN GAME
- Mr. Stick Man Game Plan
- Getting GIMP
- Creating the Game Elements
- Preparing a Transparent Image
- Drawing Mr. Stick Man
- Mr. Stick Man Running to the Right
- Mr. Stick Man Running to the Left
- Drawing the Platforms
- Drawing the Door
- Drawing the Background
- Transparency
- What You Learned
14
DEVELOPING THE MR. STICK MAN GAME
- Creating the Game Class
- Setting the Window Title and Creating the Canvas
- Finishing the __init__ Function
- Creating the mainloop Function
- Creating the Coords Class
- Checking for Collisions
- Sprites Colliding Horizontally
- Sprites Colliding Vertically
- Putting It All Together: Our Final Collision Detection Code
- The collided_left Function
- The collided_right Function
- The collided_top Function
- The collided_bottom Function
- Creating the Sprite Class
- Adding the Platforms
- Adding a Platform Object
- Adding a Bunch of Platforms
- What You Learned
- Programming Puzzles
- #1: Checkerboard
- #2: Two Image Checkerboard
- #3: Bookshelf and Lamp
- #4: Random Background
15
CREATING MR. STICK MAN
- Initializing the Stick Figure
- Loading the Stick Figure Images
- Setting Up Variables
- Binding to Keys
- Turning the Stick Figure Left and Right
- Making the Stick Figure Jump
- What We Have So Far
- What You Learned
16
COMPLETING THE MR. STICK MAN GAME
- Animating the Stick Figure
- Creating the Animate Function
- Checking for Movement
- Changing the Image
- Getting the Stick Figure’s Position
- Making the Stick Figure Move
- Starting the move Function
- Has the Stick Figure Hit the Bottom or Top of the
- Canvas?
- Has the Stick Figure Hit the Side of the Canvas?
- Colliding with Other Sprites
- Colliding at the Bottom
- Checking Left and Right
- Testing Our Stick Figure Sprite
- The Exit!
- Creating the DoorSprite Class
- Detecting the Door
- Adding the Door Object
- The Final Game
- What You Learned
- Programming Puzzles
- #1: “You Win!”
- #2: Animating the Door
- #3: Moving Platforms
- #4: Lamp as a Sprite
AFTERWORD: WHERE TO GO FROM HERE
- Installing Python pip on Windows
- Installing Python pip on Ubuntu
- Installing Python pip on Raspberry Pi
- Installing Python pip on macOS
- Trying out PyGame
- Other Games and Graphics Programming
- Other Programming Languages
- JavaScript
- Java
- C#
- C/C++
- Ruby
- Go
- Rust
- Swift
- Final Words
So, as you can see the book is JAM PACKED with Python learning fun.
“Python is a powerful, expressive programming language that’s easy to learn and fun to use! But books about learning to program in Python can be dull and gray—and that’s no fun for anyone.
Python for Kids brings Python to life and brings kids (and their parents) into the wonderful world of programming. Author Jason R. Briggs guides readers through the basics, experimenting with unique (and often hilarious) example programs that feature ravenous monsters, secret agents, thieving ravens, and more. New terms are defined; code is colored, dissected, and explained; and quirky, full-color illustrations keep things fun and engaging throughout.
Chapters end with programming puzzles designed to stretch the brain and strengthen understanding. By the end of the book, young readers will have programmed two complete games: a clone of the famous Pong, and “Mr. Stick Man Races for the Exit”—a platform game with jumps, animation, and much more.
This second edition has been completely updated and revised to reflect the latest Python version and programming practices, with new puzzles to inspire readers to take their code farther than ever before. Why should serious adults have all the fun? Python for Kids is the ticket into the amazing world of computer programming.”
The book is fantastic not just for kids but also people like me and I would imagine be great for adults who have no prior programming experience before.
It is well written and easy to follow along with and my nine-year-old son was managing to follow along, I think in another year or two when we go back to it he will really get a lot out of it as in chapter 4 when we started to see the programs coming together like rectangle:-
Right through to when he fell away a little after the tilted box without corners.
While working through the book as well i was struck how much like a really engaging school learning book from late primary and early academy it was like, not too much information on the page to digest, coloured images and really easy to take in.
Look at this little sample.
All in all a great book and one i will go back to not just with my youngest when he is ready (he wants to be a games designer amongst other things) but also on my own.
If you’re completely new to programming, this would be a fantastic book to get started with.
I mention above but will say again the feel and the tone of this book is just right for what it is trying to do and who it is aimed at.
Each chapter has not just reading but tasks to work on leading to the bigger projects.
If you are looking for a book to teach a child, young adult, someone like me with ADHD or even an older adult who would work a little slower I highly recommend this book.
Shout out to the author Jason R. Briggs for a great book.
“Jason R. Briggs has been a programmer since the age of eight, when he first learned BASIC on a Radio Shack TRS-80. Since then he has written software professionally as a developer and systems architect and served as Contributing Editor for Java Developer’s Journal. His articles have appeared in JavaWorld, ONJava and ONLamp.”
Until the next time.
Take it easy
Alex