{"id":4475,"date":"2022-02-27T17:56:20","date_gmt":"2022-02-27T17:56:20","guid":{"rendered":"https:\/\/brightchamps.com\/blog\/?p=4475"},"modified":"2024-10-17T05:25:02","modified_gmt":"2024-10-17T05:25:02","slug":"scratch-number-guessing-game","status":"publish","type":"post","link":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/","title":{"rendered":"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc"},"content":{"rendered":"<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/brightchamps.com\/blog\/\">Home<\/a><\/span> \u00bb <span><a href=\"https:\/\/brightchamps.com\/blog\/code-for-kids\/\">Code for Kids Corner<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\"><strong>How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc<\/strong><\/span><\/span><\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Anyone who is into <a href=\"https:\/\/brightchamps.com\/blog\/top-coding-courses-for-kids-a-comprehensive-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">coding <\/a>must be aware of what Scratch is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is a platform and a block-based visual programming language that has made coding easy for kids and beginners ever since its inception. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Coders can create&nbsp;various Scratch projects, and <a href=\"https:\/\/brightchamps.com\/blog\/best-scratch-games\/\">scratch games <\/a>can be developed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog, we will talk about one of the many <a href=\"https:\/\/brightchamps.com\/blog\/educational-games-for-5-year-olds\/\" target=\"_blank\" rel=\"noreferrer noopener\">interesting games<\/a> kids can make in Scratch, a number guessing game.<\/p>\n\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#how-to-create-a-number-guessing-game-in-scratch\" data-level=\"2\">How to Create a Number Guessing game in Scratch<\/a><ul><li><a href=\"#steps-to-create-a-number-guessing-game-in-scratch\" data-level=\"3\">Steps to create a Number Guessing Game in Scratch<\/a><\/li><\/ul><\/li><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-create-a-number-guessing-game-in-scratch\">How to Create a Number Guessing game in Scratch<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This game is created with an interesting programming technique called Pair programming. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Pair programming, two coders collaborate from a single workstation, one as the Driver and the other as the Navigator.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The driver will be responsible for the computer&#8217;s primary functions, i.e. they\u2019ll write codes.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The navigator assists the driver by answering questions and pointing out any problems or errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Communication is the key to having successful pair programming.&nbsp; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The navigator should think and brainstorm ideas while the driver works on the project. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Be courteous to the driver and thoroughly explain everything to him or her\u2014every 10 minutes, switch roles.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"steps-to-create-a-number-guessing-game-in-scratch\"><strong>Steps to create a Number Guessing Game in Scratch<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure that you are a registered Scratch user and that you are signed in before you click on the create button on Scratch.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img fetchpriority=\"high\" fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"458\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-1-1024x458.png\" alt=\"How to Create a Number Guessing Game in Scratch_ Pair Programming Step 1\" class=\"wp-image-4477\" style=\"width:768px;height:344px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-1-980x439.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-1-480x215.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"step-1\"><strong>Step 1:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The navigator will instruct the driver to use one sprite (who will tell the user what to do and whether or not their guess is correct) and two variables (number and guess). The majority of our code is stored in the Sprite.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We need the computer to pick a number and remember it before we ask the user for their guess\/answer. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So we require a variable for the computer to remember a value or number. A variable is a location on the computer where values can be stored.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>FIRST<\/strong>: Coding in the<a href=\"https:\/\/brightchamps.com\/blog\/grouping-sprites-in-scratch\/\"> SPRITE<\/a>, take a block from Events called<strong><em> &#8216;when the green flag is clicked,&#8217;<\/em><\/strong> then create a variable called the number, and get the block<strong><em> &#8216;set the number to 0&#8217;<\/em><\/strong>. <\/p>\n\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Attach the <strong><em>&#8216;pick a random number&#8217;<\/em><\/strong> block from the Operators to the variable: number (choose any random number between given numbers to guess). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, from the Looks, take the <strong><em>&#8216;say&#8217;<\/em><\/strong> block, type in the message that you are thinking of a number between 1 and 100 and have a few guesses to find it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>SECOND<\/strong>: Once the driver has entered the aforementioned commands, the driver, and navigator can check the provided code and proceed to step 2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"342\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-2-1024x342.png\" alt=\"How to Create a Number Guessing Game in Scratch_ Pair Programming Step 2\" class=\"wp-image-4478\" style=\"width:768px;height:257px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-2-1024x342.png 1024w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-2-980x327.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-2-480x160.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"step-2\"><strong>Step 2:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following step 1, the driver can obtain the <strong><em>&#8216;ask&#8217;<\/em><\/strong> <a href=\"https:\/\/brightchamps.com\/blog\/new-code-blocks-in-scratch-3\/\">block<\/a> from Sensing (users can answer their guess in the variable from the stage screen), followed by the<strong><em> &#8216;set guess variable to 0&#8217; <\/em><\/strong>block from Variables. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, insert the <strong><em>&#8216;answer&#8217;<\/em><\/strong> block into the variable as shown.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>NOTE: When you use the <\/em><strong><em>&#8216;ask&#8217;<\/em><\/strong><em> command, the user input (their guess) is always stored in the variable<\/em><strong><em> &#8216;answer&#8217; <\/em><\/strong><em>until you re-assign it to your variable<\/em><strong><em> &#8216;guess&#8217;<\/em><\/strong><em> in data using the &#8216;<\/em><strong><em>set variable&#8217;<\/em><\/strong><em> command.&nbsp;<\/em>The driver and navigator can discuss the variables or switch roles and move forward to Step 3.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"399\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-3-1024x399.png\" alt=\"How to Create a Number Guessing Game in Scratch_ Pair Programming Step 3\" class=\"wp-image-4479\" style=\"width:768px;height:299px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-3-1024x399.png 1024w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-3-980x382.png 980w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-3-480x187.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"step-3\"><strong>Step 3:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The navigator can explain the next commands to the driver and <a href=\"https:\/\/brightchamps.com\/blog\/time-taken-to-learn-scratch-coding\/\">code<\/a> them accordingly. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you want to test something, use the &#8216;If Then&#8217; block. You can use the green operator&#8217;s tab and select the greater than <em>(&gt;)<\/em> operator to see if the number is greater than our variable.&nbsp; <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Place the blue <strong><em>&#8216;answer&#8217;<\/em><\/strong> block on the left side of the green <strong><em>&#8216;&gt;&#8217; <\/em><\/strong>block, and place the orange variable on the right side of the block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The driver can put any code inside the <strong><em>&#8216;if-then block&#8217;<\/em><\/strong> to test if the user&#8217;s answer is greater (&gt;) than the selected number.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can investigate the case where the user selects a number from the operators that is less (&lt;) than the number selected by the device.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The equals sign (=) can then be used if the user selects the same number that the device or computer did.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"884\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-4.png\" alt=\"How to Create a Number Guessing Game in Scratch_ Pair Programming Step 4\" class=\"wp-image-4480\" style=\"width:657px;height:663px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-4.png 876w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-4-480x484.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 876px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As shown in the picture, after adding a comparison with the operators to a specific <strong><em>&#8216;if-then<\/em><\/strong>&#8216; block, the guess and number variables are compared, and to execute the <strong><em>&#8216;if-then&#8217;<\/em><\/strong> block, add a <strong><em>&#8216;say&#8217;<\/em><\/strong> block from Looks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"step-4\"><strong>Step 4:&nbsp;<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/brightchamps.com\/blog\/save-and-share-a-scratch-project\/\">The final step<\/a> is to loop by adding a<strong><em> &#8216;repeat&#8217;<\/em><\/strong> block from Looks. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Attach the<strong><em> &#8216;repeat&#8217; <\/em><\/strong>command above the <strong><em>&#8216;ask&#8217;<\/em><\/strong> command to keep giving the user chances to get it right. The driver and navigator can switch roles to check the game and get the correct response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Last, attach the &#8216;<strong><em>say&#8217; <\/em><\/strong>block from Looks to the <strong><em>&#8216;repeat&#8217;<\/em><\/strong> block to display the guesses after the attempts. To connect the sentence and the variable number, use Operators&#8217; &#8216;join&#8217; block. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In such a case, the probability of guessing the number will be displayed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"954\" src=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-5.png\" alt=\"How to Create a Number Guessing Game in Scratch_ Pair Programming Step 5\" class=\"wp-image-4481\" style=\"width:641px;height:716px\" srcset=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-5.png 854w, https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/How-to-Create-a-Number-Guessing-Game-in-Scratch_-Pair-Programming-Step-5-480x536.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 854px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you would like to know more about <a href=\"https:\/\/brightchamps.com\/blog\/free-coding-games-for-kids\/\">free coding games for kids<\/a>. Checkout here!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a user responds appropriately, you can change the game&#8217;s background to make it more engaging. To make the game more interesting, the players might also receive prizes for accurately guessing the number.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It might be an applauding noise or a piece of artwork. Depending on your creative vision, you can incorporate many more of these components.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the project is completed, the driver and navigator can have a round to see who wins the game. It will make the whole process more enjoyable.  Check out the most recent entertaining blogs on the Brightchamps blog page to find out more about pair programming and other entertaining Scratch features.<\/p>\n\n\n\n<div id=\"cstm_banner_cta\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/brightchamps.com\/\">BrightChamps<\/a> provides<a href=\"https:\/\/brightchamps.com\/blog\/teaching-financial-literacy-for-kids\/\" target=\"_blank\" rel=\"noreferrer noopener\"> financial education for kids<\/a>, equipping them with essential money management knowledge for a successful future.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"faqs\"><strong>Frequently Asked Questions (FAQs)<\/strong><\/p>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1645983833393\"><strong class=\"schema-faq-question\"><strong>What is the point of the Number Guessing Game in Scratch?\u00a0<\/strong><\/strong> <p class=\"schema-faq-answer\">The goal is to guess the number generated by the program. The program selects a number between 1 and 100 at random. It will then ask the player to enter their guess through a series of turns.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1645983846141\"><strong class=\"schema-faq-question\"><strong>What are the rules for guessing numbers in the Scratch project?\u00a0<\/strong><\/strong> <p class=\"schema-faq-answer\">If the user cannot guess anything other than a number, they are eliminated. Every time the user makes a guess, the thinker must (honestly) respond with one of three options: your guess is too high, your guess is too low, or your guess is correct. The user wins if the number is correct.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1645983864590\"><strong class=\"schema-faq-question\"><strong>What are the possibilities of winning the game in Scratch?\u00a0<\/strong><\/strong> <p class=\"schema-faq-answer\">After a few attempts, the user can play the game by guessing the answer based on the high and low areas. The user can try to set a limit to check the range in high and low and try out different options.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Anyone who is into coding must be aware of what Scratch is. It is a platform and a block-based visual programming language that has made coding easy for kids and beginners ever since its inception. Coders can create&nbsp;various Scratch projects, and scratch games can be developed. In this blog, we will talk about one of [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":4496,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"1080","footnotes":""},"categories":[49],"tags":[68],"class_list":["post-4475","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-for-kids","tag-codechamps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc - BrightChamps Blog<\/title>\n<meta name=\"description\" content=\"One of the simplest projects for pair programming in Scratch is to create a number guessing game. This is something even beginners can try\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc - BrightChamps Blog\" \/>\n<meta property=\"og:description\" content=\"One of the simplest projects for pair programming in Scratch is to create a number guessing game. This is something even beginners can try\" \/>\n<meta property=\"og:url\" content=\"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/\" \/>\n<meta property=\"og:site_name\" content=\"BrightChamps Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BrightChamps-101266664954230\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-27T17:56:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-17T05:25:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2100\" \/>\n\t<meta property=\"og:image:height\" content=\"1185\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Team BrightChamps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Team BrightChamps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/\"},\"author\":{\"name\":\"Team BrightChamps\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/person\\\/696f52bb580934e5022585ac161e5123\"},\"headline\":\"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc\",\"datePublished\":\"2022-02-27T17:56:20+00:00\",\"dateModified\":\"2024-10-17T05:25:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/\"},\"wordCount\":1133,\"publisher\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png\",\"keywords\":[\"CodeChamps\"],\"articleSection\":[\"Code for Kids Corner\"],\"inLanguage\":\"en-US\",\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/\",\"name\":\"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc - BrightChamps Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png\",\"datePublished\":\"2022-02-27T17:56:20+00:00\",\"dateModified\":\"2024-10-17T05:25:02+00:00\",\"description\":\"One of the simplest projects for pair programming in Scratch is to create a number guessing game. This is something even beginners can try\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983833393\"},{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983846141\"},{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983864590\"}],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#primaryimage\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png\",\"contentUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png\",\"width\":2100,\"height\":1185,\"caption\":\"Pair Programming in Scratch Create a Number Guessing Game\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code for Kids Corner\",\"item\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/code-for-kids\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\",\"name\":\"BrightChamps Blog\",\"description\":\"BrightChamps Blog, also known as BrightChamps Hub is a go-to resource hub for everything on Coding for kids\",\"publisher\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#organization\",\"name\":\"BrightChamps\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/BrightCHAMPS-logo-new-1.png\",\"contentUrl\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/BrightCHAMPS-logo-new-1.png\",\"width\":417,\"height\":80,\"caption\":\"BrightChamps\"},\"image\":{\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/BrightChamps-101266664954230\\\/\",\"https:\\\/\\\/www.instagram.com\\\/brightchamps\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/brightchamps\\\/mycompany\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UC_Afe_rMGoK5Bs4nSt8QIzQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/#\\\/schema\\\/person\\\/696f52bb580934e5022585ac161e5123\",\"name\":\"Team BrightChamps\",\"description\":\"We are an army of educators and passionate learners from BrightChamps family, committed to providing free learning resources to kids, parents &amp; students. Learn from Us\",\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/author\\\/team\\\/\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983833393\",\"position\":1,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983833393\",\"name\":\"What is the point of the Number Guessing Game in Scratch?\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"The goal is to guess the number generated by the program. The program selects a number between 1 and 100 at random. It will then ask the player to enter their guess through a series of turns.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983846141\",\"position\":2,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983846141\",\"name\":\"What are the rules for guessing numbers in the Scratch project?\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"If the user cannot guess anything other than a number, they are eliminated. Every time the user makes a guess, the thinker must (honestly) respond with one of three options: your guess is too high, your guess is too low, or your guess is correct. The user wins if the number is correct.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983864590\",\"position\":3,\"url\":\"https:\\\/\\\/brightchamps.com\\\/blog\\\/scratch-number-guessing-game\\\/#faq-question-1645983864590\",\"name\":\"What are the possibilities of winning the game in Scratch?\u00a0\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"After a few attempts, the user can play the game by guessing the answer based on the high and low areas. The user can try to set a limit to check the range in high and low and try out different options.\",\"inLanguage\":\"en-US\"},\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc - BrightChamps Blog","description":"One of the simplest projects for pair programming in Scratch is to create a number guessing game. This is something even beginners can try","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc - BrightChamps Blog","og_description":"One of the simplest projects for pair programming in Scratch is to create a number guessing game. This is something even beginners can try","og_url":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/","og_site_name":"BrightChamps Blog","article_publisher":"https:\/\/www.facebook.com\/BrightChamps-101266664954230\/","article_published_time":"2022-02-27T17:56:20+00:00","article_modified_time":"2024-10-17T05:25:02+00:00","og_image":[{"width":2100,"height":1185,"url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png","type":"image\/png"}],"author":"Team BrightChamps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Team BrightChamps","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#article","isPartOf":{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/"},"author":{"name":"Team BrightChamps","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/person\/696f52bb580934e5022585ac161e5123"},"headline":"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc","datePublished":"2022-02-27T17:56:20+00:00","dateModified":"2024-10-17T05:25:02+00:00","mainEntityOfPage":{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/"},"wordCount":1133,"publisher":{"@id":"https:\/\/brightchamps.com\/blog\/#organization"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#primaryimage"},"thumbnailUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png","keywords":["CodeChamps"],"articleSection":["Code for Kids Corner"],"inLanguage":"en-US","accessibilityFeature":["tableOfContents"]},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/","url":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/","name":"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc - BrightChamps Blog","isPartOf":{"@id":"https:\/\/brightchamps.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#primaryimage"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#primaryimage"},"thumbnailUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png","datePublished":"2022-02-27T17:56:20+00:00","dateModified":"2024-10-17T05:25:02+00:00","description":"One of the simplest projects for pair programming in Scratch is to create a number guessing game. This is something even beginners can try","breadcrumb":{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983833393"},{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983846141"},{"@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983864590"}],"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#primaryimage","url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png","contentUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2022\/02\/Pair-Programming-in-Scratch-Create-a-Number-Guessing-Game.png","width":2100,"height":1185,"caption":"Pair Programming in Scratch Create a Number Guessing Game"},{"@type":"BreadcrumbList","@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/brightchamps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Code for Kids Corner","item":"https:\/\/brightchamps.com\/blog\/code-for-kids\/"},{"@type":"ListItem","position":3,"name":"How to Create a Number Guessing Game in Scratch: Pair Programming\ufffc"}]},{"@type":"WebSite","@id":"https:\/\/brightchamps.com\/blog\/#website","url":"https:\/\/brightchamps.com\/blog\/","name":"BrightChamps Blog","description":"BrightChamps Blog, also known as BrightChamps Hub is a go-to resource hub for everything on Coding for kids","publisher":{"@id":"https:\/\/brightchamps.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/brightchamps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/brightchamps.com\/blog\/#organization","name":"BrightChamps","url":"https:\/\/brightchamps.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2026\/03\/BrightCHAMPS-logo-new-1.png","contentUrl":"https:\/\/brightchamps.com\/blog\/wp-content\/uploads\/2026\/03\/BrightCHAMPS-logo-new-1.png","width":417,"height":80,"caption":"BrightChamps"},"image":{"@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/BrightChamps-101266664954230\/","https:\/\/www.instagram.com\/brightchamps\/","https:\/\/www.linkedin.com\/company\/brightchamps\/mycompany\/","https:\/\/www.youtube.com\/channel\/UC_Afe_rMGoK5Bs4nSt8QIzQ"]},{"@type":"Person","@id":"https:\/\/brightchamps.com\/blog\/#\/schema\/person\/696f52bb580934e5022585ac161e5123","name":"Team BrightChamps","description":"We are an army of educators and passionate learners from BrightChamps family, committed to providing free learning resources to kids, parents &amp; students. Learn from Us","url":"https:\/\/brightchamps.com\/blog\/author\/team\/"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983833393","position":1,"url":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983833393","name":"What is the point of the Number Guessing Game in Scratch?\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"The goal is to guess the number generated by the program. The program selects a number between 1 and 100 at random. It will then ask the player to enter their guess through a series of turns.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983846141","position":2,"url":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983846141","name":"What are the rules for guessing numbers in the Scratch project?\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"If the user cannot guess anything other than a number, they are eliminated. Every time the user makes a guess, the thinker must (honestly) respond with one of three options: your guess is too high, your guess is too low, or your guess is correct. The user wins if the number is correct.","inLanguage":"en-US"},"inLanguage":"en-US"},{"@type":"Question","@id":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983864590","position":3,"url":"https:\/\/brightchamps.com\/blog\/scratch-number-guessing-game\/#faq-question-1645983864590","name":"What are the possibilities of winning the game in Scratch?\u00a0","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"After a few attempts, the user can play the game by guessing the answer based on the high and low areas. The user can try to set a limit to check the range in high and low and try out different options.","inLanguage":"en-US"},"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/comments?post=4475"}],"version-history":[{"count":11,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4475\/revisions"}],"predecessor-version":[{"id":34744,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/posts\/4475\/revisions\/34744"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/media\/4496"}],"wp:attachment":[{"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/media?parent=4475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/categories?post=4475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brightchamps.com\/blog\/wp-json\/wp\/v2\/tags?post=4475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}