CBSE Class 10 Computer Applications
Question 4 of 26
Scratch Programming II — Question 3
Back to all questions 3
Question Question 2
Create a Guessing game where your sprite generates a number (Host Number) in the range 10 to 99 (*Use Random number generator for this).
User is then asked to 'Guess this number' (userGuess) and given 5 chances to do this (*5 times loop)
If the user's number (i.e., UserGuess) is same as HostNumber, then your program should display "You Win" and plays a drum sound. If user is not able to guess the number then
- for every unsuccessful guess, display message "Try again" with a drum sound play.
- After 5 unsuccessful guesses, display, "Sorry buddy, you lose. My number was <Host Number>", with a drum sound.
