From 440880f6adcd9ad032ffd073c4712141d43dc4a2 Mon Sep 17 00:00:00 2001 From: meatball <69751659+meatball133@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:16:31 +0100 Subject: [PATCH] Fix avogadro constant (#777) --- concepts/dictionaries/about.md | 2 +- concepts/dictionaries/introduction.md | 2 +- exercises/concept/high-score-board/.docs/introduction.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/concepts/dictionaries/about.md b/concepts/dictionaries/about.md index 3c7021abe..e2582151d 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 738d6f0f8..e06a1cbb3 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 c5e66c76e..244d9a2cc 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()