Search Header Logo

Variables and Types in Swift

Authored by R M

Computers

10th - 12th Grade

Used 24+ times

Variables and Types in Swift
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the keyword for declaring a variable?

variable

var

score

let

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the term coders used for stored information using containers

Variable

Type

Constant

Algorithm

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why would you want to use a variable in your code?

You anticipate that you may want to change the value throughout the program.

Variables are the only way to store values.

You use variables when anticipate the values will not change throughout the program.

Variables can be used to declare values such as pi in mathematical equations.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one way Swift determines the type of a value in your code?

Type Intrusion

Type allegiance

Type writing

Type inference

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does Swift decide what type distance should be?

let distance: Double = 4

Type inference

Type annotation

Type writing

Type interference

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which line shows the correct type annotation in Swift?

String: let name

let String: name

let name: String

let String

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a type?

String

Variable

Double

Integer

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?