Lazy Programming Series – Challenge – 2
Challenge -2:
Problem Statement: Guess the Age Game:
Your tasked is to create a simple game to guess a specific age. The user will be prompted to guess an age within a limited number of attempts. Here are the rules of the game:
- The age to be guessed is set to 18.
- The user is allowed a maximum of 9 guesses.
- After each guess, the program provides feedback to the user, indicating whether the guessed age is too high, too low, or correct.
- If the guessed age matches the target age (18), the game ends with a victory message.
- If the user exhausts all 9 attempts without guessing the correct age, the game ends with a “Game over” message.
This problem statement outlines the objective of the game, the rules, and the expected behavior of the program. It sets the context for anyone who wants to understand or play the game.