wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Code.org Summative

Total questions: 25

Worksheet time: 50mins

Name
Class
Date
1.

    Choose the definition that best describes a conditional.

a)

The action of doing something over and over again.

b)

A command that tells you to do something only up to the point that something becomes true.

c)

A statement that a program checks to see if it is true or false.

d)

Reusable group of instructions that reduce the complexity of writing and maintaining programs. These group of instructions can be used many time in a program.

2.

Sequencing is a process in which you must work through the program step by step to find the error.

a)

TRUE

b)

FALSE

3.

Which concept best fits the following definition:

A command that tells you to do something only up to the point that something becomes true.

a)

Nested loop

b)

If / Else statement

c)

While loop

d)

Until loop

4.

Write a code to get Scrat to the acorn, using the 3 blocks in the image.

(NOTE: write the whole block and put a comma or space between each block with no capital.

Example: turn right, move forward, turn right

or turn right move forward turn right)

(a)  

5.

........................... and ...........................  are all conditionals.

a)

repeat loops  

b)

while loops   

c)

 get nectar

d)

if / else statements

e)

pick corn

6.

Choose the definition that best describes a loop.

a)

A statement that a program checks to see if it is true or false.

b)

The action of doing something over and over again.

c)

Reusable group of instructions that reduce the complexity of writing and maintaining programs. These group of instructions can be used many times in a program.

d)

A command that tells you to do something only up to the point that something becomes true.

7.

Look at the code.

How many units of nectar will the bee collect at the end?

a)

The bee will collect all of the nectars.

b)

The bee will only collect 2 nectars.

c)

The bee won't collect any nectar because the variable isn't called "gather".

8.

   "if" statements declare when a command should be run and what to run otherwise.

a)

TRUE

b)

FALSE

9.

For the following program, which value would you set gather to inside the loop?

a)
b)
c)
d)
10.

What shape will this code create.

a)

Star

b)

Square

c)

Hexagon

d)

Triangle

e)

Window

11.

What shape will this code create.

a)

Star

b)

Square

c)

Hexagon

d)

Triangle

e)

Window

12.

What shape will this code create.

a)

Star

b)

Square

c)

Hexagon

d)

Triangle

e)

Window

13.

What shape will this code create.

a)

Star

b)

Square

c)

Hexagon

d)

Triangle

e)

Window

14.

What shape will this code create.

a)

Star

b)

Square

c)

Hexagon

d)

Triangle

e)

Window

15.

The sprouts in this puzzle will be either corn or lettuce.

Take a close look at the code provided. What will happen after you click "Run"?

a)

The harvester will collect all of the crops.

b)

The harvester will pick all of the crops, except the pumpkin.

c)

The harvester will not pick any of the crops with the path she is taking.

16.

For the following program, which value would you set gather to inside the loop?

a)
b)
c)
d)
17.

For the following program, which value would you set the counter to count by to collect all nectars?

a)

1

b)

2

c)

3

18.

For the following program, which value would you set the counter to count by to collect all nectars?

a)

1

b)

2

c)

3

19.

Take a close look at the code provided. What will happen after you click "Run"?

a)

The artist will draw a triangle with 50 pixel sides.

b)

The artist will draw a 50-sided polygon with 3 pixel sides.

c)

The artist will draw three open sides with 50 degree turns.

d)

The computer will prompt the user for a number.

20.

For this code, each sprout will collect either one corn or nothing.

What will the code of “check square for corn” function be?

a)

If there “is corn” do “pick corn”

b)

While there “is corn” do “pick corn”

c)

Pick corn

21.

When you run the code what will the harvest do?

a)

Collect all the lettuces

b)

Nothing

c)

Collect 2 lettuces

d)

Move around the square without collecting anything

22.

Find the correct code for the harvest to collect everything

a)
b)
23.

Find the best code for Elsa to create the snowflake in the image.

a)
b)
24.

How many loops (repeat times) do we need to collect all the scrap metal?

a)

3

b)

4

c)

5

25.

Look carefully at the code below. What do you think will happen after you click "Run"? Remember: there will only ever be one honeycomb or one flower behind each cloud.

a)

The bee will get nectar at each flower and make honey at each honeycomb.

b)

The bee will try to get nectar from both flowers and honeycomb.

c)

The bee will try to get honey from both flowers and honeycomb.

d)

The bee will try to get honey and nectar from both flowers and honeycomb.