Skip to main content
Keep asking for guesses in a while loop until the player finds the secret number, with higher-or-lower hints and a count of attempts. Open Lab 10 in the IP Lab Portal

What you will practice

  • Loop with while until a condition is met
  • Give higher or lower hints
  • Count the number of attempts

Before you start

Time

20 minutes

Where

IP Lab Portal

Module

Module 5: Loops

  • In the IP Lab Portal, open Lab 10 - Guess the secret number.
  • In class, this lab comes right after the Lesson 2 recap slide in Module 5 core material.