Changes

Jump to navigation Jump to search
Line 21: Line 21:  
Write a guessing game computer program. It must ask the user to guess a secret number between 1 and 100 and continue until the secret number is guessed. If the user guesses the wrong number, display a message stating that they are too high or too low such as "Bad Guess – Too High - Try again". Make your program count the number of guesses taken. When the user guesses the correct number, display the Message "You guessed it in <number of guesses> guesses" and stop the program.
 
Write a guessing game computer program. It must ask the user to guess a secret number between 1 and 100 and continue until the secret number is guessed. If the user guesses the wrong number, display a message stating that they are too high or too low such as "Bad Guess – Too High - Try again". Make your program count the number of guesses taken. When the user guesses the correct number, display the Message "You guessed it in <number of guesses> guesses" and stop the program.
 
   
 
   
   
Extension: You can also provide the user with other information such as “cold”, “warm” and “hot” depending on how far out their guess is. [http://kidsprogramming.pbworks.com/w/page/12770106/Guess-the-Number]
 
Extension: You can also provide the user with other information such as “cold”, “warm” and “hot” depending on how far out their guess is. [http://kidsprogramming.pbworks.com/w/page/12770106/Guess-the-Number]
  
2,486

edits

Navigation menu