I’m supposed to write the code for this:
[FONT=”Arial Black”][SIZE=”2″]Create a new document named guess.html. Write a number guessing game that
prompts the visitor for a number and keeps prompting until the guess matches the
target. Keep a count of how many guesses the visitor makes. Display a message after
each guess as follows:
a. If the guess is within three, either higher or lower, than the target number, display
the message “You’re Red Hot!”
b. If the guess is more than three away, but less than 10 away from the target
number, say “You’re getting warm.”
c. If the guess is more than 10 away but less than 20, say “You’re getting cold.”
d. If the guess is more than 20 away, say “You’re Ice Cold!”
e. If the guess is correct, say “Success! You Win!” in an alert box. On the second line
of the alert box, display the appropriate message. If the number of guesses was
i. less than five: “You did an awesome job, it only took you ___ tries to guess
the number!”
ii. less than or equal to 15, but more than five: “Goodness. It took you
to guess the target number.”
iii. greater than 15: “Yikes! It took you ___ tries to guess the target number.”