Please enable JavaScript to use CodeHS

Introduction to Game Design with p5play

Lesson 4.4 If/Else Statements

Description

In this lesson, students learn about if/else statements as a way to make decisions and execute specific code depending on the validity of a condition.


Objective

Students will be able to:

  • Explain the purpose of if/else statements
  • Understand how to use p5play Booleans as a condition in the if statement
  • Create their own if/else statements to choose which code is executed in their programs