Question: The Problem Create a game wherein the user has to guess a number, between 0 and 10 randomly picked by the computer. The user gets

The Problem

Create a game wherein the user has to guess a number, between 0 and 10 randomly picked by the computer. The user gets 3 tries to guess the number correctly. Additionally, the computer gives the user some feedback as to how far the guess is from the actual number.

For example, let's say that the computer picks the number 8:

  • If the user's first guess is 3, then the computer should reply "Too low, try again"
  • If the user's second guess is 9, then the computer should reply "Too high, try again"
  • If the user's third guess is 8, then the computer should reply "Bingo...correct guess! You win!"
  • But if the user's third guess is 6, then the computer should reply "Sorry you lost. My number was 8"

You will use functions and conditionals to complete this assignment.

Getting Started

Plan your strategy - decompose the problem into smaller, discrete parts that you can solve individually.

Detail this strategy and your logic using pseudo-code before you begin writing actual JavaScript.

  1. Create an HTML document, named "yourlastname_02.html"
  2. Inside a