Skip to content

hemavenkat8642/Number_Guessing_Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published