Exercise 5.


Re-write your Visual Logic Number Guessing Game program that you created in Exercise 4 as an HTML page with embedded JavaScript for the program code. The page doesn't need to have a form, it can operate using only basic JavaScript I/O (alert() and prompt() boxes). Alternatively, you can design a simple HTML form to play the game.

In addition to playing the game and telling the user how many guesses the user needed to arrive at the correct answer, make the program print a record (log) of the guesses the user made. This can be done with document.write() commands, printing the log on the page, or, if you are using a form, printing the record in a text area. If you wish, you can also display the date and time in the text area at the time the user finished playing the game (i.e. got the right answer). If you are ambitious, you could even display the time it took for the user the complete the game (the difference between the start and end times).

TURN IN: upload your completed page (HTML file with JavaScript) to D2L.