Number Guessing Game
I'm thinking of a number between 1 and 100. Can you guess it?
Enter your guess:
Guess!
Your Guesses:
Play Again
Programming Concepts Demonstrated:
Variables:
Storing the secret number, guess count, and game state
Random Numbers:
Generating a random number between 1-100
Conditionals:
Using if/else to check if guess is too high, too low, or correct
Functions:
Organizing code into reusable blocks (initGame, checkGuess, etc.)
Loops:
Processing each guess until the correct answer is found
User Input/Output:
Reading guesses and displaying feedback
Arrays:
Keeping track of all previous guesses
← Back to home