Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a page named lab11a.html that contains all the usual required tags and comments. For this lab you will be creating a guessing game with
- Create a page named lab11a.html that contains all the usual required tags and comments.
- For this lab you will be creating a guessing game with similar features to the one shown in the video.
- You need to use any CSS properties and HTML to get an aesthetically pleasing look for your game page (hopefully much better than my questionable color scheme).
Hints:
- Creating this game does not require the use of loops.
- You will want one global variable (one declared outside of any function but inside a script element) to store the number to be guessed and another for the number of guesses the user has left.
- You will want two functions. One to process the user's guess and a second one to create a new game.
- The new game function needs to reset the various parts of the page to their original state, reset the number of guesses and generate a new random number for the user to guess.
- Don't forget to handle the user trying to guess with zero guesses remaining.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started