Solution 9: Guess the Number

Let's go over the solution to the "Guess the number" challenge.

Flowchart of a possible solution

We are tasked to create a game in which the program will select a random number from a given collection and the user will try to guess that number. The user would have unlimited attempts to guess the number. The program will only terminate if the user successfully guesses the correct number or enters “stop” to end the game. Below is the flowchart of one possible solution:

Get hands-on with 1200+ tech skills courses.