wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Conditionals Code.org

Total questions: 21

Worksheet time: 16mins

Name
Class
Date
1.

Conditionals let your program

a)

Repeat code to increase efficiency

b)

Make decisions to follow a different path

c)

Run in the right order

d)

Give a set of commands a custom name

2.

In this scenario it is raining. Is the conditional true or false and what will we do in this scenario.

a)

true, we will stay indoors

b)

true, we will go outside

c)

false, we will stay indoors

d)

false, we will go outside

3.

After three moves, the bee is not on nectar. Will the bee collect nectar?

a)

No, the code skips get_nectar()

b)

Yes, the code runs get_nectar()

4.

An error in a program that prevents the program from running as expected.

a)

bug

b)

debugging

c)

for loop

d)

binary

5.

Look at the puzzle and the code below. What can you fix in the code to help the bird get to the pig?

a)

Remove a move forward block

b)

Add a move forward block

c)

Change the first turn block to left

d)

Change the second turn block to left

6.

What shape does this code make?

a)

Rectangle

b)

Triangle

c)

Square

d)

Circle

7.

Can this code be written better?

a)

Yes, by using loops (repeat blocks)

b)

No, this is the best way to right this code

8.

statements that only run under certain conditions

a)

conditionals

b)

paramenter

c)

reflect

d)

variable

9.

A list of steps to finish a task.

a)

Algorithm

b)

Program

c)

Bug

10.

Is there more than one way to code a puzzle?

a)

No

b)

No, but you can make up your own design

c)

Yes

d)

Yes, but it will be counted wrong

11.

If you weren't able to complete a challenge the first time you should

a)

pout

b)

give up

c)

try again

d)

bang on the keyboard

12.
Boolean
a)
A single value of either TRUE or FALSE
b)
Any valid unit of code that resolves to a value.
c)
Part of a program that does not work correctly.
13.

The three blocks that should be placed in the if else block to get the acorn.

a)

Turn right, move forward, turn right, turn left

b)

Turn left, move forward, turn right, turn left

c)

Move forward, turn left, turn right, turn left

d)

Move forward, turn right, turn left

14.

The block needed in placed of the else block to get the acorn.

a)

Turn left

b)

Move forward

c)

Jump back

d)

Turnright

15.

Another term for an "if-else" statment is

a)

loops

b)

function

c)

conditional

d)

algorithm

16.

In this code, the condition that needs to be checked is

a)

repeat 2 times

b)

if at flower

c)

get nectar

d)

move forward

17.

In this section of code, if the bee is on a honeycomb, what will happen?

a)

The bee will make honey.

b)

The bee will move forward twice

c)

The bee will get nectar.

d)

You can't tell from this code

18.

In order for the "while there is a hole" loop to STOP running

a)

the sprite will have filled the hole once

b)

the sprite will have moved forward 6 times

c)

the statement "while there is a hole" will be true

d)

the statement "while there is a hole" will be false

19.

Which type of loop iterates until condition become False?

a)

FOR loop

b)

A count-controlled loop

c)

Repeat-once loop

d)

WHILE loop

20.

What is the value of a at the end of this animation/code?

a)

11

b)

13

c)

10

d)

9

21.

A while loop is

a)

A repeat loop with an if statement that stops when something is false

b)

A repeat loop with an if statement that stops when something is true