Skip to main content
Read a visitor’s age and print the child or adult ticket with if and else, then test the ages on each side of the limit. Open Lab 7 in the IP Lab Portal

What you will practice

  • Compare an input value with a threshold
  • Choose between two outputs with if and else
  • Test the boundary ages

Before you start

Time

15 minutes

Where

IP Lab Portal

Module

Module 4: Conditional execution

  • In the IP Lab Portal, open Lab 7 - Ticket price checker.
  • In class, this lab comes right after the Lesson 3 recap slide in Module 4 core material.