Coding for KidsCoding for Kids
Creative LevelsChallengesTeacher's Guide
Vote for features
Python Development Course
Chapter
>
Level

Introduction to Python
Collecting items

Objective

Collect all four berries in map to complete the level.

Let's get something to eat, those berries look tasty.

You can walk over them to eat them, you may think it will take a lot of coding but there’s an easier way.

Write the number of steps you'd like to take to walk further, add a number to the end of the move_forward() function inside the parenthesis to increase the number of steps you take.

This is called a function argument. Function arguments are values that you pass to a function to influence its behavior. For the function move_forward, the argument is the number of steps you want to take.

Functions can also receive more than one argument, but for now we will only use one.

It would look something like this player.move_forward(3). Helpful right? You’re welcome!

Code book