Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Final Exam: Minecraft Education Microsoft MakeCode(Block Coding)

Total questions: 50

Worksheet time: 50mins

Name
Class
Date
1.

What is the purpose of an event in coding?

a)

To store data for later use

b)

To trigger a piece of code when something happens

c)

To repeat a sequence of actions indefinitely

d)

To define a function

2.

Which of the following is an example of a variable?

a)

"move forward"

b)

10

c)

set player Score to 100

d)

teleport (10, 20, 30)

3.

What is the main purpose of a loop in programming?

a)

To execute a sequence of code multiple times

b)

To make decisions based on conditions

c)

To store different types of values

d)

To detect player movements

4.

Which type of loop runs an unknown number of times until a condition is met?

a)

Repeat Loop

b)

For Loop

c)

While Loop

d)

Forever Loop

5.

Which of the following best describes an algorithm?

a)

A sequence of steps to solve a problem

b)

A loop that runs indefinitely

c)

A special function in MakeCode

d)

A set of conditions in an "if" statement

6.

Which of the following is an example of a Boolean variable?

a)

"PlayerName"

b)

10

c)

True

d)
  1. [1, 2, 3, 4]

7.

Which of the following is a valid condition in an "if" statement?

a)

if x = 5

b)

if x

c)

if (5 + 3)

d)
  1. if "hello"

8.

What happens if an array index is out of range?

a)

The program ignores it

b)

The program crashes or returns an error

c)

The value at index 0 is returned

d)
  1. A new value is automatically inserted

9.

Which event block is best for detecting when a player moves forward?

a)

On chat command

b)

On player walked

c)

If statement

d)
  1. While loop

10.

What will happen if you forget to update a loop variable inside a while loop?

a)

The loop will run indefinitely

b)

The loop will execute only once

c)

The loop will not run at all

d)
  1. The program will crash immediately

11.

Your Agent needs to collect 10 blocks of stone, but you don’t know how far away they are.
What should you do?

a)

Use a Repeat loop (10 times)

b)

Use a While loop checking if stone is in front

c)

Use a For loop

d)
  1. Use an If statement

12.

You are programming a teleportation system where a player moves to a safe zone (x: 100, y: 50, z: 100) when they type "safe".

Which block should you use?

a)

On chat command “safe” → teleport player to (100, 50, 100)

b)

Forever loop → teleport player to (100, 50, 100)

c)

If-Else statement → teleport player when near (100, 50, 100)

d)
  1. Repeat loop → teleport player 10 times

13.

In a game, a player needs to open a door when they step on a pressure plate at (10, 5, 10).

What condition should you check?

a)

If player's x = 10 and y = 5 and z = 10, then open door

b)

If player's y > 10, then open door

c)

If player types “open”, then open door

d)
  1. Use a loop to check if the door is closed

14.

You want your Agent to move forward until it reaches a block of diamond.

Which approach is best?

a)

Use a While loop checking if the block ahead is NOT diamond

b)

Use a Repeat loop (10 times)

c)

Use a Forever loop

d)

Use an If statement

15.

Your Agent needs to collect all gold blocks in a line, but it should stop if it finds a stone block.

Which condition should you use?

a)

If block ahead = gold, move forward and collect

b)

If block ahead = stone, stop moving

c)

While block ahead is NOT stone, move forward and collect

d)
  1. Repeat 100 times: collect block

16.

You need to store the names of 5 players in a game. What should you use?

a)

A variable

b)

An array

c)

A function

d)
  1. A loop

17.

A player types "weather" in chat, and the program should say "It’s sunny" if it’s day and "It’s dark" if it’s night.

What should you use?

a)

If time = day, say "It’s sunny", else say "It’s dark"

b)

Repeat 10 times: say "It’s sunny"

c)

While loop checking if player is inside

d)
  1. Variable time = "sunny"

18.

A function "spawnTree()" places a tree at a given location.

How do you use it to plant 10 trees along a path?

a)

Repeat loop (10 times) → Call spawnTree() each time

b)

If player walks, call spawnTree()

c)

While loop checking if trees exist

d)
  1. Set tree = "10"

19.

You are programming a countdown timer for a game that decreases every second.

What should you use?

a)

A variable and a loop decreasing it by 1 each second

b)

A function returning "countdown"

c)

A teleport command

d)
  1. An If statement

20.

You need to track a player's score, which increases by 5 points every time they jump.

What should you use?

a)

Variable "score" and event "on jump"

b)

Forever loop adding 5 to score

c)

While loop tracking movement

d)
  1. If "jump" then set score = 5

21.
  1. A player must collect 5 different colored wool blocks and store them.

  2. Which data structure is best?

a)

A single variable

b)

An array

c)

A function

d)
  1. A loop

22.

An Agent needs to place 20 blocks in a row, but only every third space.

What loop structure works best?

a)

Repeat loop with step value of 3

b)

While loop checking block position

c)

Forever loop

d)

If statement without a loop

23.

You need to create a function that returns a player's current coordinates.

How do you define it?

a)

Function getPosition() → return (x, y, z)

b)

Function teleport()

c)

If loop checking coordinates

d)
  1. While loop

24.

Which block is best for checking if a player is touching lava and teleporting them away?

a)

If player on block "lava", then teleport

b)

Forever loop checking coordinates

c)

Repeat loop

d)
  1. Variable "lava"

25.

A loop that counts from 1 to 10 and prints each number should use:

a)

A For loop (1 to 10)

b)

An If-Else statement

c)

A Forever loop

d)
  1. A variable

26.

A game should stop when the player reaches a specific checkpoint at coordinate (50, 20, 50).

What should you check?

a)

If x = 50 AND y = 20 AND z = 50, then end game

b)

If player moves, then stop

c)

Repeat loop until player types "end"

d)
  1. While time > 0, stop

27.

You want to create a delay of 2 seconds between each step of a loop.

What should you use?

a)

Pause block inside the loop

b)

Repeat 2 times then wait

c)

A Forever loop

d)
  1. If-Else condition

28.

Which coordinate represents the player's vertical position?

a)

X

b)

Y

c)

Z

d)

W

29.

What is the purpose of a function in MakeCode?

a)

To move the Agent

b)

To store multiple values

c)

To group reusable blocks of code

d)
  1. To change the player's speed

30.

Which of these is an example of an event block in MakeCode?

a)

Repeat (10 times)

b)

On player chat command

c)

If condition

d)
  1. Array index

31.

Which of these statements correctly uses an If condition?

a)

If x = 10, then move player

b)

If loop repeats 10 times

c)

If teleport to (10, 20, 30)

d)
  1. If player sets a variable

32.

What data type does a Boolean variable store?

a)

A number

b)

A list of items

c)

A function

d)
  1. True or False

33.

What happens if you use an If condition without an Else statement?

a)

The program crashes

b)

The code runs only if the condition is true

c)

The code loops forever

d)

The If block runs every time

34.

A player wants to teleport to a safe location if their health drops below 5.

What should you use?

a)

If player health < 5, teleport to (10, 20, 30)

b)

Repeat loop to check player health

c)

Forever loop setting player health to 10

d)
  1. Function returning player health

35.

You are creating a farming system where crops grow faster at night.

How should you check for nighttime?

a)

If world time > 12000, grow crops faster

b)

Repeat loop checking daylight

c)

While loop checking player movement

d)
  1. If player places a torch

36.

A game should end when a player collects 5 diamonds.

What should you use?

a)

If diamonds = 5, then end game

b)

Repeat loop checking player inventory

c)

While loop setting game over

d)
  1. If time > 1000

37.

A command "dig" should make the Agent dig forward until it hits stone.

What condition should you check?

a)

While block ahead ≠ stone, move forward and dig

b)

Repeat 10 times: dig forward

c)

Forever loop breaking blocks

d)
  1. If block ahead = dirt, dig

38.

You want to track the number of times a player jumps.

What should you use?

a)

Variable "jumps" + event "on player jump"

b)

Repeat loop checking air movement

c)

While loop tracking player

d)

If-Else checking altitude

39.

A player wants to create a door that only opens if they are holding a specific key item (gold nugget). What condition should you use?

a)

If player inventory contains "gold nugget", open door

b)

While holding item, repeat "open door"

c)

Forever loop checking player inventory

d)
  1. Repeat loop setting inventory to "gold nugget"

40.

A player needs to build a 10-block high tower.

What is the best way to do this?

a)

Repeat loop (10 times) → Place block → Move up

b)

Forever loop → Place block

c)

If condition checking height → Place block

d)
  1. Set variable "tower" = 10

41.

A function "createWall()" should build a wall only if there is empty space ahead.

What is the best approach?

a)

If block ahead = air, then run createWall()

b)

Repeat loop placing wall

c)

While loop checking space ahead

d)
  1. If player moves, place wall

42.

You are creating a function "spawnAnimals()" that spawns 5 cows and 3 pigs.

How should you implement it?

a)

Use a Repeat loop (5 times) to spawn cows, then another Repeat loop (3 times) to spawn pigs

b)

While loop checking animal count

c)

While loop checking animal count

d)
  1. Forever loop creating animals

43.

A player wants a teleportation pad that activates only when they step on a specific block (emerald block).

What should you use?

a)

If player on block "emerald block", teleport

b)

Repeat loop checking player position

c)

Forever loop setting position

d)

Variable checking teleportation

44.

A game gives players points every time they destroy a tree.

What is the best way to track their score?

a)

Variable "score" + event "on tree destroyed"

b)

Repeat loop adding 1 to score

c)

If-Else statement updating score

d)
  1. Forever loop setting score to 10

45.

An Agent should place blocks in a staircase pattern.

What is the best approach?

a)

Repeat loop → Place block → Move forward → Move up

b)

While loop checking height

c)

If-Else statement inside a loop

d)

Forever loop placing blocks

46.

A game should display "You Win!" when a player reaches level 10.

What should you use?

a)

If player level = 10, then display "You Win!"

b)

Forever loop displaying text

c)

While loop tracking level

d)

Repeat loop setting level

47.

A function "rainbowRoad()" should place colored wool blocks in order (red, orange, yellow, green, blue, purple).

What is the best way to store these colors?

a)

Use an array [red, orange, yellow, green, blue, purple]

b)

Create a separate function for each color

c)

Use a loop without storing colors

d)
  1. Set a variable to "rainbow"

48.

A game should randomly choose a prize for the player.

What data structure should you use?

a)

An array of prizes, selecting a random index

b)

A variable storing the prize

c)

A Repeat loop generating prizes

d)
  1. An If statement assigning prizes

49.

A game should stop if a player runs out of health.

What is the best condition to check?

a)

If player health = 0, then end game

b)

Repeat loop setting health

c)

While loop tracking health

d)

If player jumps, end game

50.

You want to create a timer that decreases every second until it reaches 0.

What is the best way to do this?

a)

Variable "timer" starting at a value → Repeat loop decreasing it by 1 every second

b)

Forever loop setting timer to 0

c)

If-Else statement tracking time

d)
  1. Set Variable “timer” and set a starting value, While loop decreasing timer by 1 every second by checking timer is more than 0