wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Swift Code Year 6

Total questions: 20

Worksheet time: 16mins

Name
Class
Date
1.

What is Swift Playground?

a)

A tool used to write a pseudo code for any program

b)

Advanced tool to create applications

c)

Powerful programming language created by Apple

d)

An algorithmic designer tools

2.

What best describes an algorithm?

a)

A step-by-step series of operations

b)

Only calculations that use advanced mathematics

c)

The computer equivalent of rhythm

d)

The same thing as an identifier

3.

What is a sequence ?

a)

specific actions for the computer to perform

b)

Is the order in which the commands are given

c)

is the repeated actions

d)

is the algorithmic thinking skills

4.

What is a mistake in code called?

a)

error

b)

debug

c)

bug

d)

misfunction

5.

By writing commands you give instructions to do something. Which command sequence is formatted correctly?

a)

collectGem()

moveForward()

b)

collect Gem ()

move Forward ()

c)

(moveForward)

(collectGem)

d)

moveForward() collectGem()

6.

Writing code allows you to create your own instructions for your device to carry out. Select ALL of the activities below that require following instructions.

a)

Following a recipe

b)

Building a Lego set

c)

Going for a run

d)

Putting a drone together

7.

Code that tells an application to perform a specific action is called a...

a)

instruction

b)

command

c)

program

d)

switch

8.

To make Byte do anything you need to tap (a)   My Code.

9.

Choose the proper code to make Byte move forward one space and collect a gem.

a)

moveForward() collectGem()

b)

moveForward()

collectGem()

10.

What is the correct code to solve this problem?

a)

move Forward()

move Forward()

move Forward()

collect Gem()

b)

moveForward()

moveForward()

collectGem()

c)

moveForward()

goUpstairs()

moveForward()

collectGem()

d)

moveForward()

moveForward()

moveForward()

collectGem()

11.

A mistake that keeps your program from running correctly is called a (a)   .

12.

Which code will get Byte to collect the gem and then toggle the switch?

a)

moveForward()

moveForward()

turnLeft()

moveForward()

collectGem()

moveForward()

toggleSwitch()

b)

moveForward()

turnLeft()

moveForward()

moveForward()

collectGem()

moveForward()

toggleSwitch()

c)

moveForward()

moveForward()

moveForward()

collectGem()

turnLeft()

moveForward()

toggleSwitch()

13.

Making mistakes is actually one of the best ways to learn something new and remember it for a long time!

a)

True

b)

False

14.

What is the result of executing a function in code?

a)

An error message

b)

A specific task being performed

c)

A new variable

d)

Compilation

15.

Which of the following is a valid reason for a syntax error?

a)

Not using the correct capitalisation in commands

b)

Missing a semicolon at the end of a statement

c)

Not using brackets at the end of a command

d)

All of the above

16.

What does it mean to debug a program?

a)

To enhance its performance

b)

To compile it without errors

c)

To find and fix errors

d)

To add new features

17.
What is "the action of doing something over and over again"?
a)
debugging
b)
redo
c)
loop
18.
What is "a list of steps that you can follow to finish a task"?
a)
program
b)
algorithm
c)
loop
19.
What is "an algorithm that has been coded into something that can be run by a machine"?
a)
loop
b)
conditional
c)
program
20.
What is "an action that causes something to happen"?
a)
event
b)
digital footprint
c)
program