Skip to content

Module quiz: Introduction to programming in Swift :Programming Fundamentals in Swift (Meta iOS Developer Professional Certificate) Answers 2026

Question 1

If you were to store the balance of a bank account, which would be the best to store this in?

A variable
❌ A constant


Question 2

Which of the following would be ideal to store in a constant?

❌ The number of pages in the English dictionary
❌ The number of words in the English language
The number of letters in the English alphabet


Question 3

The keyword var is used to declare what in Swift?

A variable
❌ A constant


Question 4

What operator do you use to check if two strings are the same?

==
❌ !=


Question 5

Swift’s Strings are Unicode compliant.

True
❌ False


Question 6

Which operator means greater than?

>
❌ <
❌ <=
❌ >=


Question 7

Switch statements do require a default keyword.

❌ True
False


Question 8

A “for loop” can use ranges to define the number of loops.

Yes
❌ No


Question 9

Which of the following operators are used to define an optional?

?
❌ !


Question 10

What is the output of the following code?

let text = "text"
if let number = Int(text) {
print("The number is \(number).")
} else {
print("Invalid number!")
}

Invalid number!
❌ The number is 4.


🧾 Summary Table

Question Correct Answer
Q1 A variable
Q2 The number of letters in the English alphabet
Q3 A variable
Q4 ==
Q5 True
Q6 >
Q7 False
Q8 Yes
Q9 ?
Q10 Invalid number!