WorksheetsSwift Code Year 6
Total questions: 20
Worksheet time: 16mins
What is Swift Playground?
A tool used to write a pseudo code for any program
Advanced tool to create applications
Powerful programming language created by Apple
An algorithmic designer tools
What best describes an algorithm?
A step-by-step series of operations
Only calculations that use advanced mathematics
The computer equivalent of rhythm
The same thing as an identifier
What is a sequence ?
specific actions for the computer to perform
Is the order in which the commands are given
is the repeated actions
is the algorithmic thinking skills
What is a mistake in code called?
error
debug
bug
misfunction
By writing commands you give instructions to do something. Which command sequence is formatted correctly?
collectGem()
moveForward()
collect Gem ()
move Forward ()
(moveForward)
(collectGem)
moveForward() collectGem()
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.
Following a recipe
Building a Lego set
Going for a run
Putting a drone together
Code that tells an application to perform a specific action is called a...
instruction
command
program
switch
To make Byte do anything you need to tap (a) My Code.
Choose the proper code to make Byte move forward one space and collect a gem.
moveForward() collectGem()
moveForward()
collectGem()
What is the correct code to solve this problem?
move Forward()
move Forward()
move Forward()
collect Gem()
moveForward()
moveForward()
collectGem()
moveForward()
goUpstairs()
moveForward()
collectGem()
moveForward()
moveForward()
moveForward()
collectGem()
A mistake that keeps your program from running correctly is called a (a) .
Which code will get Byte to collect the gem and then toggle the switch?
moveForward()
moveForward()
turnLeft()
moveForward()
collectGem()
moveForward()
toggleSwitch()
moveForward()
turnLeft()
moveForward()
moveForward()
collectGem()
moveForward()
toggleSwitch()
moveForward()
moveForward()
moveForward()
collectGem()
turnLeft()
moveForward()
toggleSwitch()
Making mistakes is actually one of the best ways to learn something new and remember it for a long time!
True
False
What is the result of executing a function in code?
An error message
A specific task being performed
A new variable
Compilation
Which of the following is a valid reason for a syntax error?
Not using the correct capitalisation in commands
Missing a semicolon at the end of a statement
Not using brackets at the end of a command
All of the above
What does it mean to debug a program?
To enhance its performance
To compile it without errors
To find and fix errors
To add new features
