Swift Playground Variables

Swift Playground Variables

Assessment

Flashcard

Computers

University

Hard

Created by

Iman Meg

FREE Resource

Student preview

quiz-placeholder

6 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What are variables in Swift Playground?

Back

Variables are used to store and manipulate data in Swift Playground.

2.

FLASHCARD QUESTION

Front

What are the types of variables in Swift Playground?

Back

In Swift Playground, variables can be of various types such as Int, String, Double, Bool, etc.

3.

FLASHCARD QUESTION

Front

How do you increment a variable in Swift Playground?

Back

You can increment a variable in Swift Playground using the += operator. For example, var x = 1; x += 1; results in x being 2.

4.

FLASHCARD QUESTION

Front

Match the variable with its datatype: var name = "John"

Back

String

5.

FLASHCARD QUESTION

Front

Match the variable with its datatype: var age = 30

Back

Int

6.

FLASHCARD QUESTION

Front

Match the variable with its datatype: var isStudent = true

Back

Bool