How to make an Odd Even Number Checker in Scratch

How to make an Odd Even Number Checker in Scratch: Step by Step Guide

By Selly Mitra Mailanda
Home » Code for Kids Corner » How to make an Odd Even Number Checker in Scratch: Step by Step Guide

Block-based visual computer language and the platform Scratch are used for coding.

This is a significant advantage for kids, as they can learn to code easily with this language. The illustrations make it more fun for them to learn.

Children can make various things, such as games, animations, applications, and more, simply by dragging and dropping the blocks and designing in Scratch, one of the many block-based programming languages available.

Kids can thus use their imagination to build anything they like using the blocks on Scratch while learning about coding.

Odd Even Number Checker in Scratch
Scratch Dashboard

Odd Even Number Checker is a fantastic exercise to get you started in Scratch programming. But the question is, how do you create a project from scratch? 

That’s a great question, and you’re one of the lucky ones because this blog has got you covered!

Another important question here is, who is Scratch really for?

Well, Scratch is for everyone. It doesn’t matter how old you are. If you are interested in coding, Scratch is for you.

So, scratch coding for kids is a user-friendly and creative way to introduce young learners to the world of programming

But it is beneficial for kids and coding beginners since it gives them a basic idea of what coding is.

How to Create a project in Scratch

Step 1: Go to MIT Scratch

Step 2: Click on Create

Step 3: Choose a Backdrop

Step 4: Choose a Sprite

Step 5: Write the script for the project 

Step 6: Run

For those new to Scratch or coding, one of the fun projects they can make is a number checker, a game that shows whether the number you entered is even or odd.

Sounds interesting right?

So how do you create it?

Create an Odd/Even Number Checker in Scratch

Let’s take a look at the process step by step below.

Once you’re on stage in Scratch, i.e. your work area, all you have to do is drag and drop the necessary blocks onto the stage and arrange them in a precise sequence.

To begin, select the sprite that will be the main character of your game, i.e. they will interact with the user and answer whether the given/entered number is even or odd.

Step 1: Choose a Sprite from Choose a Sprite button on the lower right end of the screen

Odd Even Number Checker in Scratch

Step 2: Drag and drop the block “When Green Flag Clicked” on the stage

Odd Even Number Checker in Scratch

Step 3: Drag “go to front layer” block and attach it to the block mentioned above

Step 4: Add the block “Ask () and wait”

Insert whatever message you want between the brackets (); for example, ask users to enter a number. For example, in the figure provided in this blog, we have entered the message ‘you have one chance to enter the number.

Step 5: Add “if () then” block. Write the Answer inside the brackets ().

Step 6: Place an equal operator, 0, within Step 5

Step 7: Place the code for “mod” also known as modulo, in Step 6. Mod is an operator and a reporter block.

In programming, the operation of modulo returns to be division as a reminder or signed reminder after one number is divided by another. 

Step 8: Add the block “say” for an even number. Here, you will enter your message for an even number, such as ‘That’s even number, dude!’ in the message box and 2 seconds in the time box, as shown in the figure provided in this blog.

This ‘Say’ block has two inputs: one for what will be displayed in the speech bubble and one for how long the speech bubble will be displayed on the Stage.

Step 9; Add the block “say” for an odd number. Here, you will enter your message for an odd number, such as ‘That’s an odd number, dude!’ in the message box and 2 seconds in the time box, as shown in the figure provided in this blog.

The steps listed above are the basic codes needed to create this project in which your Sprite determines whether the number entered is even or odd.

Simply drag and drop the codes listed above into your workspace.

For beginners, this is a very simple project. You can customize this project by changing the backdrop, customizing the sprite, adding motion, and so on, all the creativity depends on your vision.

After you finish your project should look like this

Odd Even Number Checker in Scratch
Final Output

Conclusion

To summarise what has been said thus far, Scratch can assist you in writing a lot of code to make amusing applications, games, and animations, transforming you from a non-programmer to a coder. So why delay any longer? Start your first Scratch project right away. Check out the most recent entertaining blogs on the BrightCHAMPS blog page to find out more about Scratch programming and the entertaining projects you can create with it.

BrightChamps Book Free Trial

Learn Scratch at BrightChamps with its specially designed curriculum that makes learning programming easy for students in Grade 1-12. BrightChamps also teaches a variety of other programs that help kids build a foundation in computer programming through activities, assignments, and other means. To get your hands on more such articles, educational content, and free resources on coding for kids, robotics courses for kids, game development, etc., check out the BrightCHAMPS Blog Page now!

Selly Mitra Mailanda

⭐⭐⭐⭐⭐

I love that life is full of challenges; I believe my desire to solve problems is what led me to a career in technology, which I love.I hope that by partnering with BrightChamps I can help children become leaders both in the tech-world and in life. Learn from Me

Reach Us

Categories

General Sidebar Widget Coding

Get a Talent Discovery Certificate after trial class

100% Risk-Free. No Credit Card Required

Related Articles

Trending Articles