Chapter 25. Skier Explained

In Chapter 10, you typed in a Skier game (hopefully!) and ran it. There were some notes in the code, but we didn’t give any other explanation. Typing in code and running it, even if you don’t completely understand it, can be a great way to learn programming in general or learn a particular language.

But now that you know more about Python, maybe you’re a little curious about how the Skier program works. In this chapter, we’re going to go through it in detail.

The skier

First we’ll program the skier. When you played the Skier program, you probably noticed that the skier only moves back and forth across the screen. He doesn’t move up and down. The illusion of skiing “down” the hill is created by the scenery (trees ...

Get Hello World! Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.