Minds On
What is an invasive species?
An invasive species is a living thing that is usually found in a given area. In other words, an invasive species is not originally from there. They almost always disturb the ecosystem where they have been introduced. Sometimes invasive species come to a new area by accident and sometimes they are brought on purpose by humans.
Invasive species may harm other living things and the environment in the area. It may affect the economy or the health of humans in a negative way too. Invasive species can be plants, animals, bacteria, and other kinds of living things. In many cases, invasive species can grow and spread quickly in an area.
Access the following video entitled “Border Patrol: Leo’s Fishhead” to learn more about the problems of invasive species.
You can code a quiz in Scratch: True or False?
Yes, it’s true! It is possible to make several types of quizzes in Scratch. For each type, the ask () and wait block is used to ask questions and input answers.
When you combine the ask () and wait block with the if (answer=…) then block (along with a few others), you can create a quiz that has statements followed by the option of clicking the correct response between “true” and “false”. You can also add change (score) by (number) block to keep score for the player.

The following is the code for the algorithm.
set score to 0
ask ‘This totally happened, for real’ and wait
if answer = true then
change score by 1
say correct! For 2 seconds
if answer = false then
change score by 0
say wrong for 2 seconds
Access the following Scratch link to explore the code: Scratch(Opens in a new window)
Press the green flag at the top to begin the example true/false quiz.
Now, let’s write our own true/false quizzes about what we know of invasive species!
Remember your “questions” need to be written as statements in order for the “true” and “false” options to make sense for the player. No question marks!
Action
Let’s explore some code!
Now that you’ve explored an example of a true/false quiz, let’s use some code to make a true/false quiz of your own. Your quiz is going to be on the topic of invasive species. You are going to be exploring a coding app known as Scratch!
Coding is a computer programming language that can be used to model concepts and design programs.
Scratch is a coding application that uses blocks to create code. Let’s learn more about how we might use Scratch.
Student Success
Let's think about code!
When you start your own project in Scratch, you will be making code using blocks. A block is a small piece of code that appears to be a puzzle piece or a building block. You can use blocks to build your own code. Each kind of block controls an action. There are 9 kinds of blocks available at the start! As you learn more, you may find other types of blocks to add to your code.
Each block describes an action that is performed by a character. An action is like an instruction. A character can be a sprite or a backdrop. A sprite is an image of a person or object. A backdrop is an image of a background or a place. Your code creates actions that affect a sprite or a backdrop. You can choose if you are using a sprite or a backdrop.
As you make your code, you are connecting blocks to make a code block. Your block of code is known as a code block or a script! The space where you build your code is also known as the scripts area. Press and place each of your blocks into the centre area to make your code. When you activate your code, it is known as running your code.
To start creating code, press on a block and move it to the center area. Press and snap or place your next block under your current block. Now you have created a code block!
Once you have made a code block, your code should perform an action. The action can be made by a character like a sprite or a backdrop. You can make as many characters as you like. You can make different coding instructions for each one!
You can change the order of your blocks or delete a block at any time. You can also copy or duplicate a section of your code. To copy code, right-click on the first block you want to copy. It will copy all of the blocks that follow it. Connect your copied code to the bottom of the code block you want to it added to!
Note to teachers: See your teacher guide for collaboration tools, ideas and suggestions.
To explore some possible code elements and blocks that you may come across in this learning activity, press on the following tabs:
A sprite is a character that carries out the actions that you make with your code.

The backdrops can also be changed by your code. Some blocks change what the backdrop will do!

A motion block makes a sprite move! You can move, turn or ask a sprite to move to a certain position.

A looks block changes how a sprite looks! You can choose costumes for each of your sprites.

A sound block make audio, or a sound. You can use the audio that is included in Scratch. You can also record your own sounds!

An events block is the start button for a code block. To decide when you want your code to run or start, place an events block at the beginning of your code. Your events block is how you decide when your code will start!
Your events block has to be your first block because it starts your code. You can choose how you want your code to start!

A control block is a block that controls when an action happens. A control block can change the order and timing of an action. You can use control blocks to wait, to repeat and even to loop your code!

A sensing block is a block that helps characters work with each other.
For example, what happens if you have two sprites ask each other a question?

An operators block is a block that adds math to your code.
Operators blocks can be tricky to put together.
Before you can put an operators block in your code block, you have to add another block! You could use a sensing block or a variables block. You will need to fill any blank spaces that are part of your operators block. Press and drag a sensing or variables block to snap into any blank spaces. Now you can put your operator block in your code block!

A variables block is a block that keep track of information. A variables block helps to change how to code is run each time. It can be used to create a challenge in a game!

My Blocks is a special area to keep your very own blocks! You can save your own blocks in the My Blocks category.

Now you have explored what kind of blocks you can use in Scratch!
Let’s first create an example of a good true/false question about invasive species. You may notice that questions in code are different!
To create your true/false quiz, follow the following steps:
- Make a statement. Do not use the form of an actual question. In code, we can’t use question marks!
- Use words or expressions like “do not”, “is not”, “are not”, etc. for an added challenge to the player. For example, the Asian Carp is NOT an invasive species in Canada because it overeats the food supply of native fish.
- The player would then type in either true or false into the answer box and receive the appropriate output depending on whether their answer was correct. For example: The player guessed false and received the “Correct!” feedback output.
Access the following Scratch link to explore the code: Scratch(Opens in a new window)
Press the green flag at the top to run the code.
Here are some things you need to know:
- The green flag at the top of the screen will execute (run) all the code following ‘when green flag clicked’ block.
- If you make the code yourself, you need to rename your variable to “score” in the ‘set (my variable) to 0’ block the first time you place it. If you duplicate the code instead, you can skip this step.

This image shows scratch code while it is being created.
Set my variable to
Choices are: my variable (there is a checkmark beside this choice)
Rename variable
Delete the “my variable” variable
Then there is the ‘Rename Variable’ window. Rename all “my variable” variables to: There is a window where the word ‘score’ is added.
Then there are Cancel/Ok buttons that can be clicked on.
It might feel silly, but don’t actually create questions in the ‘ask () and wait’ block! Write them as statements. Remember, do not use any question marks.
- To engage a player more, you might want to consider using the ‘switch backdrop to…’ and ‘switch costume to…’ blocks before every new question in your code.
Press ‘Hint’ to explore more possible ideas to consider.
Consider also using custom backdrops or sprites that are relevant to your invasive species “questions” in the quiz.
Code!
Your task is to create your own quiz to share what you’ve learned about invasive species.
Create your own quiz by continuing the true/false quiz code that has been started for you.
Access the following Scratch link to explore the code: Scratch(Opens in a new window)
You have two options for how you want to continue writing the code.
Option 1
- Use the “Duplicate” feature (right click on the highest-up block of the chain you want to duplicate, then click “Duplicate”). You can then attach this chain of blocks directly right after the chain before it.

This is an image showing the ‘duplicate’ option. The image shows the window that appears when you right click on the highest-up block of the chain of the code. This window shows three options; duplicate, add comment and delete block.
Option 2
- Drag each of the blocks from left-side menu individually to build the next chain.

This is a colour image of scratch code while it is being built. This image is showing the option of dragging blocks from the left-side menu to build the chain of the code. On the left side, there are different options that one can choose from. By clicking on an option, it gets added to the code chain at the right side. There is an arrow showing that the chosen option from the left-side menu gets added to the bottom of the code chain.
When forming each new “question” (true/false statement), make sure that each of the following blocks are setup for your desired output.
- The ‘change (score) by…’ blocks values to 1 for the correct answer; and 0 for the wrong answer. The ‘say () for 2 seconds’ blocks have the proper feedback for the player (Correct! Vs. Wrong!) The code currently stores the value of the score variable, but it does not display the actual score. In order to display the score, you will need to ensure the score variable has a checkmark within the Variables tab. Select the Variables tab on the left hand side
- Beside the score variable, ensure the checkbox has a checkmark – this will display the score variable on the stage so the user will be able to see their score throughout the quiz. Explore the following image and description for more information.

This image shows scratch code while it is being created.
This is a colour image of scratch code while it is being created.
To ensure the score variable is displayed, select the Variables tab.
Click on the checkbox next to the score variable.
The score variable and its value will appear on the stage.
Extend!
Add some “polish” to your quiz! Let’s check out how you could add sounds and music to your quiz.
- Insert ‘Sound’ blocks for each “question”. The sound can even be your own voice recordings! For example, a different sound could play if the player gets a “Correct” or a “Wrong” output.

This image shows the steps on how to include sound. The scratch code is shown and there is a circle around the add extension feature which is two wavy lines with an additional sign in the top corner.
- Add music using the “Add extension” feature.
Consolidation
What do our true/false quizzes tell us?
Pause and Reflect
Making quizzes
We can test our friends, family, and peers on what we know. You might have found that making a quiz yourself helped you learn. For example, did your invasive species quiz help you remember a bit more?
Instead of asking normal questions (with a “?”), you had to think of asking “questions” in the form of a statement. This means a player had to answer with “true” or “false”. Was it trickier to write the “questions” this way, instead of with a “?”
Now that you know how to create a quiz in Scratch that keeps score, you’re ready to make quizzes is many different ways/styles. You can base other quizzes on the block chains you used for the “true/false output” style in this activity.
Explore the following checklist to access helpful reminders while creating your own Scratch code.
Happy quizzing!
Reflection
As you read through these descriptions, which sentence best describes how you are feeling about your understanding of this learning activity? Press the button that is beside this sentence.
I feel…
Now, record your ideas using a voice recorder, speech-to-text, or writing tool.