Search Header Logo

SWIFT Playground - Week 4

Authored by Samar Sharkh

Computers

9th Grade

Used 77+ times

SWIFT Playground - Week 4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

42 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What do you call the following block of code?

func moveLong

{

moveForward()

moveForward()

moveForward()

}

Function

Condition

Conditional code

Loop

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following represents a value that can only be either true or false?

Character
Double
Integer
Boolean

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How many conditions are used in the following code segment?

1

2

3

4

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which of the following is the operator that is used in the code fragment above to invert the value of a Boolean condition?

if

else

!

&&

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which of the following commands will be executed if the tile is blocked (isBlocked) according to the above code?

collectGem()

moveForward()

turnLeft()

turnLeft()

moveForward

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How many Gems in the puzzle above will be collected according to the above code fragment?

1

2

3

4

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which of the following is considered a condition in the above code?

isOnGem

moveForward()

collectGem()

turnLeft()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?