NEW
Font size
WorksheetsLearn to Code: Swift Playgrounds
Total questions: 10
Worksheet time: 10mins
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 coding?
The repeated actions in the program
Algorithmic thinking skills
Telling a computer what to do.
None of the above
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()
Longer sequences of code can involve ----------------
less bugs.
more bugs.
fewer variables.
fewer actions.
If the code is not running as intended, what could be the cause of the problem?
bugs
interface
sequence
code
Sometimes we solve coding problems by combining existing commands to create a new behavior. This process is called composition. Which is an example from Swift Playgrounds of composition?
When I told the bot to collectGem()
When I learned to toggleSwitch()
When I created a turnRight() with three turnLeft()
When I write 1 line of code.
With the following code, what would you expect to see happen when you run your code?
func saySomething ( ) {
print ("Functions are awesome")
saySomething ( )
}
saySomething ( )
Functions are awesome, once
Functions are awesome, twice
Functions are awesome, repeated over and over and over...
Nothing
