AI‐14 - Code-the-Dream-School/intro-to-programming-2025 GitHub Wiki
There are at least 8 bugs in this assignment students need to find and correct. The submitted assignment's program is expected to:
- Have no errors in the browser console.
- At the start, the
reset
button and all of themessages
should be hidden. - An user should be able to type a number into the input field and click
Submit Guess
to submit the form. - When the form is submitted, an user should see the following:
- A message displaying the number that was entered.
- A message displaying how many tries you have left (starts at 5 and decrements by 1).
- A message describing the guess (too low, too high, etc.).
- A "reset" button that restarts the game.
- If the guessed number is BELOW the target, the message should say
too low
. - If the guessed number is ABOVE the target, the message should say
too high
. - If the guessed number is the SAME as the target, then:
- The input field and "Submit Guess" button should be disabled.
- The message should say
guessed correctly
.
- If the guessed number is not the same AND all 5 tries have been used, then:
- The input field and
Submit Guess
button should be disabled. - The message should say
0 guesses remaining
.
- The input field and
- When you click the
reset
button, the form should return to its initial state (not disabled).
As stretch goals (optional):
- You should not be able to submit a guessed number lower than 1.
- You should not be able to submit a guessed number higher than 99.
- If there is only one guess left, it should say "guess" (singular) instead of "guesses" (plural)