Exercise: Loop Constructs

Practice what we have learned about loop constructs.

We'll cover the following

Exercise

Write a game called “More or Less.” The first participant chooses any number from 1 to 100. The second participant tries to guess it in seven tries.

Our script chooses a number. The user enters their guess. The script answers if the guess is more or less than the chosen number. The user then tries to guess the number six more times.

Get hands-on with 1200+ tech skills courses.