Search Header Logo

Swift Unit 2

Authored by Darren Hanson

Computers

9th - 12th Grade

24 Questions

Used 3+ times

Swift Unit 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What best describes an algorithm?

Only calculations that use advanced mathematics

The computer equivalent of rhythm

A step by step series of operations

The same thing as an identifier

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a benefit of using functios?

They can give you infinite loops

They keep your code organized.

They prevent repeated code

They make larger programs easier to understand

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

With the following code, what would you expect to see in the console in a playground?


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

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

With the following code, what would you expect to see in a console playground?


func saySomething ( ) {

print ("Functions are awesome")

}

saySomething ( )

saySomething

Functions are awesome

Nothing

Something

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

With the following code, what would you expect to see in the console in a playground?


func saySomething ( ) {

print ("Functions are awesome")

}

Functions are awesome

saySomething

Something

Nothing

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What's another word for the lines of code that a function contains?

Body

Clause

Parameters

Return Value

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which line is the correct way to declare a function?

let myFunction = func ( ) {

let func = myFunction ( ) {

func myFunction ( ) {

func = myFunction ( ) {

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?