diff --git a/concepts/dictionaries/about.md b/concepts/dictionaries/about.md index 3c7021ab..e2582151 100644 --- a/concepts/dictionaries/about.md +++ b/concepts/dictionaries/about.md @@ -13,7 +13,7 @@ As [dictionaries][dictionaries] are one of Swift's three primary collection type ```swift var addresses: Dictionary = ["The Munsters": "1313 Mockingbird Lane", "The Simpsons": "742 Evergreen Terrace", "Buffy Summers": "1630 Revello Drive"] var sequences: [String: [Int]] = ["Euler's totient": [1, 1, 2, 2, 4, 2, 6, 4], "Lazy caterer": [1, 2, 4, 7, 11, 16, 22, 29, 37], "Carmichael": [561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841]] -let constants: = ["pi": 3.14159, "e": 2.71828, "phi": 1.618033, "avogadro": 6.02214076e22] +let constants: = ["pi": 3.14159, "e": 2.71828, "phi": 1.618033, "avogadro": 6.02214076e23] ``` - Empty dictionaries can be written by following the type name of the dictionary by a pair of parenthesis, e.g. `[Int: String]()`, or, if the type can be determined from the context, as just a pair of square brackets surrounding a colon, `[:]`. diff --git a/concepts/dictionaries/introduction.md b/concepts/dictionaries/introduction.md index 738d6f0f..e06a1cbb 100644 --- a/concepts/dictionaries/introduction.md +++ b/concepts/dictionaries/introduction.md @@ -7,7 +7,7 @@ Dictionary literals are written as a series of `key: value` pairs, separated by ```swift var addresses: Dictionary = ["The Munsters": "1313 Mockingbird Lane", "The Simpsons": "742 Evergreen Terrace", "Buffy Summers": "1630 Revello Drive"] var sequences: [String: [Int]] = ["Euler's totient": [1, 1, 2, 2, 4, 2, 6, 4], "Lazy caterer": [1, 2, 4, 7, 11, 16, 22, 29, 37], "Carmichael": [561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841]] -let constants = ["pi": 3.14159, "e": 2.71828, "phi": 1.618033, "avogadro": 6.02214076e22] +let constants = ["pi": 3.14159, "e": 2.71828, "phi": 1.618033, "avogadro": 6.02214076e23] var emptyDict1: [Int: Int] = [:] var emptyDict2 = [Character: String]() var emptyDict3 = Dictionary() diff --git a/exercises/concept/high-score-board/.docs/introduction.md b/exercises/concept/high-score-board/.docs/introduction.md index c5e66c76..244d9a2c 100644 --- a/exercises/concept/high-score-board/.docs/introduction.md +++ b/exercises/concept/high-score-board/.docs/introduction.md @@ -7,7 +7,7 @@ Dictionary literals are written as a series of `key: value` pairs, separated by ```swift var addresses: Dictionary = ["The Munsters": "1313 Mockingbird Lane", "The Simpsons": "742 Evergreen Terrace", "Buffy Summers": "1630 Revello Drive"] var sequences: [String: [Int]] = ["Euler's totient": [1, 1, 2, 2, 4, 2, 6, 4], "Lazy caterer": [1, 2, 4, 7, 11, 16, 22, 29, 37], "Carmichael": [561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841]] -let constants = ["pi": 3.14159, "e": 2.71828, "phi": 1.618033, "avogadro": 6.02214076e22] +let constants = ["pi": 3.14159, "e": 2.71828, "phi": 1.618033, "avogadro": 6.02214076e23] var emptyDict1: [Int: Int] = [:] var emptyDict2 = [Character: String]() var emptyDict3 = Dictionary()