wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Learn to Code: Swift Playgrounds

Total questions: 10

Worksheet time: 10mins

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 coding?

a)

The repeated actions in the program

b)

Algorithmic thinking skills

c)

Telling a ​computer what to do.

d)

None of the above

5.

What is a mistake in code called?

a)

error

b)

debug

c)

bug

d)

misfunction

6.

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()

7.

Longer sequences of code can involve ----------------

a)

less bugs.

b)

more bugs.

c)

fewer variables.

d)

fewer actions.

8.

If the code is not running as intended, what could be the cause of the problem?

a)

bugs

b)

interface

c)

sequence

d)

code

9.

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?

a)

When I told the bot to collectGem()

b)

When I learned to toggleSwitch()

c)

When I created a turnRight() with three turnLeft()

d)

When I write 1 line of code.

10.

With the following code, what would you expect to see happen when you run your code?


func saySomething ( ) {

print ("Functions are awesome")

saySomething ( )

}

saySomething ( )

a)

Functions are awesome, once

b)

Functions are awesome, twice

c)

Functions are awesome, repeated over and over and over...

d)

Nothing