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

Scratch is a block-based visual programming language and platform for coding.

With Scratch, anyone in the world, especially children, can learn about coding from the ground up.

Among the various block-based programming languages out there, Scratch is a very simple application for kids because just by drag-and-dropping the blocks and design they get to create a variety of things such as games, animations, applications, and so on.

As a result, kids can use their creativity to create whatever they want with the blocks on scratch all the while they learn about coding.

Odd Even Number Checker in Scratch
Scratch Dashboard

They can begin their journey of learning a programming language on Scratch starting with this project. But the question is, how do you create a project on 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 someone who is interested in coding, Scratch is for you.

But it is especially helpful for kids and coding beginners since it gives them a basic idea of what coding really 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 who are new to Scratch or coding, one of the fun projects they can make is a number checker, which is 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 stage and arrange them in a clear 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 stage

Odd Even Number Checker in Scratch

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

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

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

Step 5: Add “if () then” block. Write 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 further 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 help you create a funny application, games, and animations with a lot of code, allowing you to go from someone who knows nothing about programming to a coder. So what are you waiting for, go ahead and create your first Scratch project now.

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.

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

Categories

Learn Scratch Animation

Become A Certified Scratch Game Developer for FREE!

100% Risk-Free. No Credit Card Required

Get Scratch Certified

Related Articles

Trending Articles

Free Coding Resources

Free Kids Coding Resources📕

Receive a copy of our Top 10 FREE Resources for your Kids

Success! 🎉

Share This