TABLE OF CONTENTS CHAPTER 1 What Is Code 5 CHAPTER 2 Steps to Solve a Problem 9 CHAPTER 3 Speaking to Machines 13 CODING IN ACTION Creating Instructions 18 CHAPTER 4 Events Conditions and Loops 21 CHAPTER 5 Translating It Back 25 Focus on How Coding Works 30 Index 32 Glossary 31 To Learn More 32
CHAPTER 1 WHAT IS CODE A soccer player kicks the ball It soars past the goalie and into the net The crowd shouts and cheers The player off balance falls onto the field But no one is hurt The soccer player isn’t human It’s a robot In fact all the players are robots They run kick and pass the ball Code controls a robot’s actions It tells this robot how to move its arms and legs 5