Teacher's Guide

Chapter 1 / Level 5: Printing on screen

Teaching Objective:

  • Student understand information can be displayed in game
  • Learn how to use the speak() function
  • Understand the differences between the types of functions in the game

Guide

In order to successfully complete this scenario you must make your way to each of the X marks on the map and use the speak() function to call out the exclamation “Hello”

player.speak("Hello")

You need to make sure you write the word “Hello” exactly as written in order to call out successfully. And you need to perform this action in all three X mark spots to complete the level.

Map overview and path

Map overview and path

Code Solution

import player

player.move_forward(2)
player.turn_left()
player.move_forward(3)
player.speak("Hello")
player.turn_left()
player.move_forward(2)
player.turn_right()
player.move_forward(4)
player.speak("Hello")
player.turn_right()
player.move_forward(7)
player.speak("Hello")
Chapter 1 / Level 5: Printing on screen | Teacher's Guide