Please enable JavaScript to use CodeHS

Python Basics with Tracy

Lesson 5.8 Clickable Interaction

Description

In this lesson, students will learn how to allow the user to interact with their programs using their mouse. They will learn how to allow interaction when the user clicks on Tracy or anywhere on the canvas as well as how to effectively use variables inside clickable programs.


Objective

Students will be able to:

  • use the onclick function inside their programs
  • use the getscreen function to allow the user to click anywhere on the canvas to trigger an event
  • use and manipulate variables inside programs that use the onclick function