Step 1 Add to your beginning script the blocks so that the sprite welcomes the player and asks for their name before beginning. Step 2 We want to give the player more guess correctly. Have the information if they don’t sprite tell the player if the secret number is bigger or smaller than the number that they guessed. Step 3 Right now, the sprite always picks a number between 1 and 10. Change this so that the sprite always picks a number between 1 and a to add variable named max. (Don’t forget the variable.) Add to your script so that it asks the player what they would like the maximum number to be, before choosing a random number. Use this maximum number as the highest number that the sprite will choose. Step 4 Now keep track of how many guesses it takes before the player guesses the right let’s number. You will need a new variable for this task and will need to add to it every time a guess occurs. Step 5 When the player guesses the secret number, tell them how many guesses it took, and congratulate them using their name. Part II: Number Guessing Game Part 2 Lab- Guessing Game version 2.0 The Number Guessing Game that just created had you utilize IF statements and random number generators. This week, you will expand upon that game and make it smarter! The goal of this Expanded Guessing Game version 2.0) is to make (we’ll call it, sprites that play the game smarter! In addition, since this will make the game much make the guessing sprite have to get three guesses right to win. faster, we’ll Open your Guessing Game project from the last unit to use as a reference. Create a new project called yourLastName_GuessingGame2. This version will use two sprites: one to hold the secret number and give hints and the other to try to guess the secret. Step 0 Before beginning to build your program, look at what variables we will need and let’s what each sprite should do to play the game.
Step 1 Add to your beginning script the blocks so that the sprite welcomes the player and asks for their name before beginning. Step 2 We want to give the player more information if they don’t guess correctly. Have the sprite tell the player if the secret number is bigger or smaller than the number that they guessed. Step 3 Right now, the sprite always picks a number between 1 and 10. Change this so that the sprite always picks a number between 1 and a variable named max. (Don’t forget to add the variable.) Add to your script so that it asks the player what they would like the maximum number to be, before choosing a random number. Use this maximum number as the highest number that the sprite will choose. Step 4 Now let’s keep track of how many guesses it takes before the player guesses the right number. You will need a new variable for this task and will need to add to it every time a guess occurs. Step 5 When the player guesses the secret number, tell them how many guesses it took, and congratulate them using their name. Part II: Number Guessing Game Part 2 Lab- Guessing Game version 2.0 The Number Guessing Game that just created had you utilize IF statements and random number generators. This week, you will expand upon that game and make it smarter! The goal of this Expanded Guessing Game (we’ll call it, version 2.0) is to make sprites that play the game smarter! In addition, since this will make the game much faster, we’ll make the guessing sprite have to get three guesses right to win. Open your Guessing Game project from the last unit to use as a reference. Create a new project called yourLastName_GuessingGame2. This version will use two sprites: one to hold the secret number and give hints and the other to try to guess the secret. Step 0 Before beginning to build your program, let’s look at what variables we will need and what each sprite should do to play the game.
Guessing_Game.docx