wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

J2 Assessment 4 2025

Total questions: 65

Worksheet time: 1hrs 5mins

Name
Class
Date
1.

An instruction that tells the computer to perform a certain action is called a (a)   .

Choose from the below words
Command
Variable
Loop
Database
2.

(a)   is a set of instructions that tell the computer what to do. Normally read and performed from top to bottom.

3.

(a)   is the term for a command that makes our Farmbot move forward by one square.

Choose from the below words
move_forward()
turn_left()
pick_up()
stop()
4.

(a)   are commands that allow you to perform a specific action without having to write lots of code.

Choose from the below words
Functions
Variables
Loops
Classes
5.

(a)   tells the computer to run a function, using open and closing brackets ( ) after the name of the function.

Choose from the below words
Function Call
Function Definition
Variable Assignment
Loop Statement
6.

Match each programming term to its correct definition.

a)

Argument

1.

A value that goes between the brackets after the function name.

b)

Variable

2.

A named storage location for data in a program.

c)

Operator

3.

A symbol that performs a specific operation on one or more operands.

d)

Statement

4.

A single instruction or command in a program.

7.

(a)   is the term for a set of commands used to perform a particular task.

Choose from the below words
Algorithm
Variable
Loop
Selection
8.

(a)   is the term for a function that tells the Farmbot to prepare the soil.

Choose from the below words
prepare_soil()
water_plants()
harvest_crops()
plant_seeds()
9.

(a)   is the term for a function that takes a single argument such as 'potato' and plants the specified crop.

Choose from the below words
plant()
grow()
harvest()
water()
10.

What is the term for the following definition? Programming in sequence.

a)

Event-Driven Programming

b)

Sequential Programming

11.

A series of characters held between quotation marks, either single ' ' or double " " is called a (a)   . This will stop the computer trying to run what is held between the quotes as a command.

12.

(a)   is the term for the set of rules that define the correct combination of symbols and characters in a programming language.

Choose from the below words
Syntax
Algorithm
Variable
Function
13.

(a)   are a set of rules that dictate how to name values in programming. Camel Case uses capital letters (e.g., camelCase). Snake Case uses underscores (e.g., snake_case).

Choose from the below words
Naming conventions
Data types
Control structures
Syntax errors
14.

What is the term for the following definition? An error in the code.

a)

Bug

b)

Loop

c)

Array

d)

Function

15.

What is the term for the following definition? The process of looking for bugs and getting rid of them.

a)

Debugging

b)

Compiling

c)

Designing

d)

Documenting

16.

What is the term for the following definition? A message that indicates there is an error in the code.

a)

Error Message

b)

Success Notification

c)

Warning Signal

d)

Output Statement

17.

Syntax Errors are defined as (a)  

Choose from the below words
Errors such as missing quote marks
Errors that occur when a program ru
Errors that are caused by incorrect
Errors that occur due to hardware f
18.

Name Errors are defined as (a)  

Choose from the below words
Errors such as misspelling a functi
Errors that occur when a file is no
Errors caused by dividing a number
Errors that happen due to insuffici
19.

Indentation Errors are defined as (a)  

Choose from the below words
Errors caused by incorrect use of i
Errors caused by missing semicolons
Errors caused by using undeclared v
Errors caused by incorrect function
20.

What is the definition of Logic Errors?

a)

Errors where the code runs but does not do what the programmer expects.

b)

Errors that prevent the code from compiling.

c)

Errors that cause the program to crash immediately.

d)

Errors that are always detected by the compiler.

21.

What is the definition of Console?

a)

An interface used for text input and output.

b)

A device used to play video games only.

22.

What is the definition of Comment in programming?

a)

A text annotation in the code that helps make code more readable. Comments are ignored by the computer. In Python, you can start a comment using the # symbol.

b)

A function that executes a specific task in the program.

23.

Ensuring that, over time, a program can be easily maintained. Can be defined as....

a)

Maintainability of code

b)

Creating code

c)

Debugging

d)

Algorithms

24.

What does the function harvest_crop() do?

a)

A function used to tell the Farmbot to harvest the crop in front of it.

b)

A function that waters the plants automatically.

c)

A function that monitors soil temperature.

d)

A function that sends weather updates to the user.

25.

What does the function ship_crops() do?

a)

A function that will tell the Farmbot to navigate to the drop-off and ship the crops collected.

b)

A function that waters the crops automatically every morning.

c)

A function that plants new seeds in the farm plot.

d)

A function that monitors the weather and adjusts irrigation accordingly.

26.

What is a For Loop?

a)

An instruction that allows the code within it to be repeated.

b)

A variable that stores multiple values.

c)

A function that returns a value.

d)

A type of error in programming.

27.

What is a Keyword in programming?

a)

A word that has been reserved to perform specific functionality. Programmers cannot use it for anything other than this purpose.

b)

A variable used to store user input.

c)

A function that prints output to the screen.

d)

A comment added to explain code.

28.

What does Whitespace mean in Python?

a)

Tabs and spaces in Python. Whitespace is how Python knows which commands to repeat in loops. Whitespace must be consistent.

b)

A special character used to end a Python program.

c)

A built-in Python function for sorting lists.

d)

A type of variable used to store numbers in Python.

29.

What is Iteration in programming?

a)

The repeating of instructions, typically using loops. This allows algorithms to be designed quickly and with fewer unnecessary lines of code.

b)

A method to store data permanently in a database.

c)

A process of converting high-level code to machine code.

d)

A way to connect multiple computers together in a network.

30.

What is the primary programming language used in the Farmbot course?

a)

JavaScript

b)

C++

c)

Python

d)

Java

31.

What is the key concept introduced in the 'Iteration' section?

a)

Variables

b)

Functions

c)

For loops

d)

Conditionals

32.

What is a computer program?

a)

A device that stores data

b)

A set of instructions that tells the computer what to do

c)

A type of computer hardware

d)

A programming language

33.

An instruction that tells the computer to perform a certain action

(a)  

34.

What is a function in programming?

a)

A type of variable

b)

A command that performs a specific action

c)

A mistake in the code

d)

A set of rules for writing code

35.

Another word that means to 'run' a function

(a)  

36.

What is an argument?

a)

A debate between programmers

b)

A value that goes between the brackets after a function name

c)

A type of error message

d)

A naming convention

37.

A series of characters inside of the quotation marks " "

(a)  

38.

What is the purpose of a comment in code?

a)

To execute a command

b)

To make code easier to understand but without executing a command

c)

To cause an error message

d)

To store data

39.

What is a FOR loop used for in programming?

a)

To store data

b)

To repeat a section of code a fixed number of times

c)

To create a new function

d)

To define a variable

40.

What is camel case?

a)

A type of error message

b)

A naming convention using capital letters at the start of additional words

c)

A method of debugging

d)

A type of loop

41.

What is an algorithm?

a)

A type of programming language

b)

A set of commands used to perform a particular task

c)

A mistake in the code

d)

A naming convention

42.

What is the console in programming?

a)

A type of variable

b)

An interface where text is output and input

c)

A command that performs a specific action

d)

A naming convention

43.

What is the purpose of whitespace in programming?

a)

To store data

b)

To indent commands under lines of code such as for loops

c)

To create a new function

d)

To cause an error message

44.

Snake case will use what symbol in its naming convention?

a)

underscore _

b)

space " "

c)

hyphen -

d)

full stop .

45.

Match the following terms around problems with your code

a)

A mistake in the code

1.

Bug

b)

The act of finding and fixing errors

2.

Debugging

c)

Sent to the computer console when there is a mistake in the code

3.

Error message

46.

Maintainability means that a program can be...​ (a)  

Choose from the below words
easily managed and organised
run without any errors
47.

Iteration is the ​ (a)   of instructions, by ​ (b)   through the piece of code

Choose from the below words
repeating
looping
executing
running
sequencing
moving
48.

A word reserved by the program that allows it to perform a specific task

(a)  

49.

Select the two function calls

a)

move_forward

b)

move_forward()

c)

turn("left")

d)

"left"

50.

Select the code that will prepare soil and then plant a tomato

a)
b)
c)
d)
51.

Where is Farmbot going to be after running the code?

a)
b)
c)
d)
52.

Identify the bug in the code shown

a)

Indentation error - caused by incorrect spelling

b)

Name Error - caused by incorrect spelling

c)

Syntax Error - caused by incorrect brackets

d)

Symtax Error - caused by incorrect quote marks

53.

Which two of these functions have been written using snake case?

a)

plant()

b)

turn()

c)

prepare_soil()

d)

move_forward()

54.

What is debugging?

a)

The process of finding bugs in your code

b)

The process of writing bugs into your code

c)

A mistake in your code

d)

The process of finding and removing bugs from your code

55.

To bring up the code builder interface in Minecraft, we press:

a)

The 'M' key

b)

The 'C' key

c)

The 'T' key

d)

The 'TAB' key

56.

When we give the variable a name - it is important that this name is:

a)

Descriptive and Meaningful

b)

Capital Letters

c)

General

d)

Random

57.

What are 4 types of variables?

a)

Number Variables

b)

Position Variables

c)

Boolean Variables

d)

Text Variables

e)

Colour Variables

58.

Which of the following best describes a variable in programming?

a)

A reserved word used to perform specific tasks

b)

A storage location identified by a name that can hold a value

c)

A type of error in the code

d)

A comment added to explain code

59.

Which symbol is commonly used to start a comment in Python?

a)

//

b)

#

c)

--

d)

/*

60.

Which of the following is an example of a variable name in Python?

a)

my_variable

b)

print()

c)

if else

d)

for

61.

What is the most basic form of decision-making in MakeCode?

a)

AGENT

b)

Repeat blocks

c)

IF/Then blocks

d)

Variables

62.

What does the IF/Then block do?

a)

Allows you to decide whether to perform an action based on a condition.

b)
The IF/Then block stores data in a variable.
c)
The IF/Then block creates a loop.
d)
The IF/Then block only displays text.
63.

6 comparison operators, Match the following symbol to the correct term:

a)

==

1.

Equal to

b)

2.

Not equal to

c)

>

3.

Greater than

d)

<

4.

Less than

e)

>=

5.

Greater than or equal to

64.

What is the main benefit of using variables in your Minecraft code?

a)
Variables are only used for storing images.
b)

They make the game look better

c)

They allow you to store and reuse values

d)
Variables are unnecessary in Minecraft coding.
65.

What is the benefit of using loops in building structures in Minecraft?

a)

They make the game faster.

b)

They allow you to build large structures with less code.

c)

They change the color of blocks

d)
Loops slow down the building process significantly.