wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

TuringLab Farmbot

Total questions: 24

Worksheet time: 16mins

Name
Class
Date
1.

What is a command?

a)

"An instruction put in between quote marks"

b)

An instruction that tells the computer to perform a certain action.

c)

An instruction put in CAPITAL LETTERS

d)

An instruction that is repeated at least once

2.

What is a computer program?

a)

A computer that has learned to program

b)

A text document written by a computer

c)

A television program on a computer

d)

A set of instructions that tell the computer what to do

3.

Which two of these are function calls?

a)

prepare_soil

b)

move_forward()

c)

"tomato"

d)

prepare_soil()

4.

What is a function?

a)

A function is a command that performs a specific action when called

b)

Functions are words that always have brackets after them

c)

Functions are commands that have quotes around them and can be put between brackets

d)

Functions are commands that allow you to convert your code from one language to another

5.

Which function call moves the Farmbot forward?

a)

move_forward()

b)

move_forward

c)

Move_Forward()

d)

moveForward()

6.

What is an algorithm?

a)

A set of instructions that are to be repeated more than once

b)

A set of commands used to perform a particular task

c)

Any computer program

d)

A command created by Mr. Algo Rhythm

7.

Which two of the following are strings?

a)

tomato

b)

'A very large pumpkin'

c)

pumpkins and aubergines

d)

"tomato"

8.

Which of these is a function call?

a)

plant

b)

plant("tomato")

c)

move_forward()

d)

"tomato"

9.

Select the two function calls

a)

move_forward

b)

move_forward()

c)

turn("left")

d)

"left"

10.

Identify which lines of code the strings appear on

a)

2, 3

b)

1, 2

c)

2, 4

d)

1, 3

11.

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

a)
b)
c)
d)
12.

Which of these is an argument in the code shown?

a)

plant()

b)

move_forward()

c)

"tomato"

d)

plant("tomato")

13.

Where is Farmbot going to be after running the code?

a)
b)
c)
d)
14.

Identify the two functions written in snake case

a)

returnHome()

b)

prepare_soil()

c)

turn("right")

d)

move_forward()

15.

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

16.

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

17.

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

18.

Select the two ways of adding a comments in Python

a)

// Move into position

b)

## Harvest a row

c)

/* Plant a row */

d)

# Move into position

19.

Which two students have commented their code effectively?

a)
b)
c)
d)
20.

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

a)

plant()

b)

turn()

c)

prepare_soil()

d)

move_forward()

21.

Which of the following is NOT a common error message when writing Python code?

a)

Name Error

b)

Syntax Error

c)

Indentation Error

d)

Spelling Error

22.

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

23.

Which of the following is the correct way of writing a FOR loop?

a)
b)
c)
d)
24.

Which three of the following describe the benefits of using a FOR loop in your code?

a)

It helps create more readable and maintainable code

b)

It stores useful information for later retrieval

c)

It helps select which path to take in the code

d)

It helps by reducing repetition in a programmers code

e)

It helps create clear and concise code