NEW
Font size
WorksheetsSwift Coding Quiz 1
Total questions: 22
Worksheet time: 18mins
What best describes an algorithm?
A step-by-step series of operations
The computer equivalent of rhythm
Only calculations that use advanced mathematics
The same thing as an identifier
Which of the following challenges would the provided code solve?
What is a command ?
a specific action for the computer to perform
the order in which the commands are given
the repeated action of a programmer
algorithmic thinking skills
What is a mistake in code called?
error
debug
bug
misfunction
_________________ is telling a computer what to do.
Call
Conditionals
Coding
Composition
A collection of commands grouped together and given a name. The set of commands can then be run with just the name of the set whenever it is needed. Like a shortcut.
For Loop
Function
Sequence
Composition
By writing commands you give instructions to do something. Which command sequence is formatted correctly?
collectGem()
moveForward()
Collect Gem ()
Move Forward ()
(moveForward)
(collectGem)
move.Forward() collect.Gem()
Which of the following is not a benefit of using functions?
They can give you infinite loops
They keep your code organized.
They prevent repeated code
They make larger programs easier to understand
Which line is the correct way to declare a function?
let myFunction = func ( ) {
let func = myFunction ( ) {
func myFunction ( ) {
func = myFunction ( ) {
What don't programmers like doing?
Repeating themselves
Repeating themselves
Repeating themselves
All of the above
Which of these are written in "camel case"?
FIRSTname
firstName
first_name
first_name (camel)
If your code is not running as intended what may be cause of the problem?
Bugs
interface
sequence
code
What is a sequence ?
specific actions for the computer to perform
the order in which the commands are given
repeated actions
algorithmic thinking skills
Which command is used to turn a switch on?
toggle()
activateSwitch()
toggleSwitch()
onSwitch()
What is coding?
Repeated actions in the program
Algorithmic thinking skills
Telling a computer what to do.
None of the above
What is the command used to gather jewels in Swift playground?
collectJewel()
collectGem()
getGem()
getJewel()
What is debugging?
errors in code
creating a correct sequence of commands
finding and fixing errors
What is Swift playgrounds?
A tool used to write a pseudo code for any program
An advanced tool to create applications
A powerful programming language created by Apple
Algorithmic designer tools
What is a function?
An activity that is natural to the purpose of a person or thing
An expression involving one or more variables
A large or formal social event
A collection of commands grouped together and given a name.
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
Which is the correct code to have Byte move forward?
moveForward()
MoveForward ( )
moveFor ( )
moveForward ( )
While defining a function we use the keyword:
Func
FUNC
func
funC
