Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.62 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.62 KB

Number_Guessing_Game

This game was made using HTML, CSS and JS.

A random number will be generated using Math.random() in JS. The entered value will be compared or verified with the generated random value and we'll get output accordingly. The range of the generated random values which I have given in the code is 0 to 25.
Assuming the random value generated by JS as computer value here.

Instructions to play game :
---> You must enter a number between 0 and 25. Otherwise, the output will be "Please enter a valid number between 0 to 25"
---> If the entered value is less than the previous 5 values of computer value, the output will be "Too Low! Try again."
---> If the entered value is present in the previous 5 values of computer value, the output will be "Low! Try again with a nearby value."
---> If the entered number is exactly equal to the computer value, the output will be "Congratulations! You won the game."
---> If the entered value is present in the next 5 values of computer value, the output will be "High! Try again with a nearby value."
---> If the entered value is more than the next 5 values of computer value, the output will be "Too High! Try again."
---> You can play the game as many times as you can.

Try playing the game now.

Link to play the game : https://hemavenkat8642.github.io/Number_Guessing_Game/

Hint : You can find the randomly generated number in the console.
To open console, right click on the webpage and click on "Inspect".
And then, click or open the "Console" tab.
Before or after playing the game, you can know the correct number to win the game.