Skip to content

Commit 92eb8bc

Browse files
Rename concept exercises (#1464)
* Rename booleans -> annalyns_infiltration * Add lasagna blurb * Rename comments -> weather forecast * Rename conditionals -> blackjack * Rename constants -> savings-account * Renamee errors -> deep-thought * Fix depe-thought's blurb * Rename maps -> gross-store * Fix chessboard's prerequisites * Rename structs -> need-for-speed * Rename methods -> elons-toys * Fix some package names to follow conventions Co-authored-by: Eric Kingery <[email protected]> * Fix remaining package names with underscores * Rename numbers -> car-factory * Fix gross-store config * Put active concept exercises in "beta" * Rename slices -> card-tricks * Rename strings -> party-robot * Rename strings-package -> logs-logs-logs * Rename time -> booking-up-for-beauty * Rename zero-values -> zero, zilch, nada * Fix booking-up-for-beauty config * Fix booking_up_for_beauty forked from * Rename car-factory -> cars-asemble * Update exercises/concept/cars-assemble/.docs/introduction.md Co-authored-by: Eric Kingery <[email protected]> * Update exercises/concept/cars-assemble/.meta/design.md Co-authored-by: Eric Kingery <[email protected]> Co-authored-by: Eric Kingery <[email protected]>
1 parent 5017fdd commit 92eb8bc

File tree

140 files changed

+485
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+485
-208
lines changed

concepts/strings-package/introduction.md

-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,3 @@ For example, you can get a `byte` at position `i` from a `string` called `s` wit
1313
With that said, string types are immutable so operations like s[i] = 'a' are not available and will result in a compilation error.
1414

1515
[Strings, bytes, runes and characters in Go](https://blog.golang.org/strings) provides a deep dive into this topic.
16-
17-
This exercise also introduces _conditionals_. Here is a little intro:
18-
[Go by Example: If/Else](https://gobyexample.com/if-else)

config.json

+280-6
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,179 @@
4343
"basics"
4444
],
4545
"prerequisites": [],
46-
"status": "active"
46+
"status": "beta"
47+
},
48+
{
49+
"slug": "annalyns-infiltration",
50+
"name": "Annalyn's Infiltration",
51+
"uuid": "8833b0c0-1008-4426-8225-1dc2b4852d52",
52+
"concepts": [
53+
"booleans"
54+
],
55+
"prerequisites": [
56+
"basics"
57+
],
58+
"status": "beta"
59+
},
60+
{
61+
"slug": "party-robot",
62+
"name": "Party Robot",
63+
"uuid": "b3594c44-1a68-489d-a446-16369247c84c",
64+
"concepts": [
65+
"strings"
66+
],
67+
"prerequisites": [
68+
"basics"
69+
],
70+
"status": "beta"
71+
},
72+
{
73+
"slug": "weather-forecast",
74+
"name": "Weather Forecast",
75+
"uuid": "63415c33-658e-4722-bd81-0b80060aecc9",
76+
"concepts": [
77+
"comments"
78+
],
79+
"prerequisites": [
80+
"basics"
81+
],
82+
"status": "wip"
83+
},
84+
{
85+
"slug": "savings-account",
86+
"name": "Savings Account",
87+
"uuid": "13f6b5ab-f4bb-453a-a6a9-50132a1d4885",
88+
"concepts": [
89+
"constants"
90+
],
91+
"prerequisites": [
92+
"basics",
93+
"comments",
94+
"strings"
95+
],
96+
"status": "beta"
97+
},
98+
{
99+
"slug": "blackjack",
100+
"name": "Blackjack",
101+
"uuid": "628308fc-34e9-46ae-9661-9e0ebceeef34",
102+
"concepts": [
103+
"conditionals-if",
104+
"conditionals-switch"
105+
],
106+
"prerequisites": [
107+
"booleans",
108+
"strings",
109+
"numbers"
110+
],
111+
"status": "beta"
112+
},
113+
{
114+
"slug": "booking-up-for-beauty",
115+
"name": "Booking up for Beauty",
116+
"uuid": "57ae07c8-8d7a-4f16-bd25-81a9646dac39",
117+
"concepts": [
118+
"time"
119+
],
120+
"prerequisites": [
121+
"basics",
122+
"strings",
123+
"numbers"
124+
],
125+
"status": "beta"
126+
},
127+
{
128+
"slug": "cars-assemble",
129+
"name": "Cars Assemble",
130+
"uuid": "7ab1692d-b7e8-4f11-9bbd-2b855501e5ce",
131+
"concepts": [
132+
"numbers",
133+
"type-conversion"
134+
],
135+
"prerequisites": [
136+
"constants",
137+
"conditionals-if"
138+
],
139+
"status": "beta"
140+
},
141+
{
142+
"slug": "gross-store",
143+
"name": "Gross Store",
144+
"uuid": "fb70cf92-fd2c-453b-896c-21a957cfb093",
145+
"concepts": [
146+
"maps"
147+
],
148+
"prerequisites": [
149+
"basics",
150+
"conditionals-if",
151+
"numbers"
152+
],
153+
"status": "beta"
154+
},
155+
{
156+
"name": "Need For Speed",
157+
"slug": "need-for-speed",
158+
"uuid": "b165c8b4-429f-4e9f-b157-a636d22b217f",
159+
"concepts": [
160+
"structs"
161+
],
162+
"prerequisites": [
163+
"conditionals-if",
164+
"numbers"
165+
],
166+
"status": "beta"
167+
},
168+
{
169+
"name": "Elon's Toys",
170+
"slug": "elons-toys",
171+
"uuid": "18fb2aa2-9748-481e-a321-6b6844c1deb6",
172+
"concepts": [
173+
"methods"
174+
],
175+
"prerequisites": [
176+
"structs",
177+
"pointers"
178+
],
179+
"status": "beta"
180+
},
181+
{
182+
"slug": "deep-thought",
183+
"name": "Deep Thought",
184+
"uuid": "097176e2-5024-44e7-ab86-9bc0ec245347",
185+
"concepts": [
186+
"errors"
187+
],
188+
"prerequisites": [
189+
"constants",
190+
"types"
191+
],
192+
"status": "wip"
193+
},
194+
{
195+
"name": "Card Tricks",
196+
"slug": "card-tricks",
197+
"uuid": "154660c2-db8c-4ec1-91f2-6b1275eabbc0",
198+
"concepts": [
199+
"slices"
200+
],
201+
"prerequisites": [
202+
"numbers",
203+
"conditionals-if",
204+
"iteration"
205+
],
206+
"status": "beta"
207+
},
208+
{
209+
"name": "Logs, Logs, Logs!",
210+
"slug": "logs-logs-logs",
211+
"uuid": "81230a7c-4e47-4a4d-a004-14eae32ec914",
212+
"concepts": [
213+
"strings-package"
214+
],
215+
"prerequisites": [
216+
"slices"
217+
],
218+
"status": "beta"
47219
},
48220
{
49221
"name": "Chessboard",
@@ -53,13 +225,25 @@
53225
"range-iteration"
54226
],
55227
"prerequisites": [
56-
"basics",
57-
"conditionals",
58-
"functions",
228+
"conditionals-if",
59229
"maps",
60-
"slices"
230+
"slices",
231+
"iteration"
232+
],
233+
"status": "beta"
234+
},
235+
{
236+
"name": "Zero, Zilch, Nada",
237+
"slug": "zero-zilch-nada",
238+
"uuid": "fa4735f8-4d8a-4fb1-85ed-9cf03e9f7b7a",
239+
"concepts": [
240+
"nil",
241+
"zero-values"
242+
],
243+
"prerequisites": [
244+
"types"
61245
],
62-
"status": "active"
246+
"status": "beta"
63247
}
64248
],
65249
"practice": [
@@ -1571,6 +1755,96 @@
15711755
"name": "Basics",
15721756
"slug": "basics",
15731757
"uuid": "5d2b4677-1850-4ee4-890d-dc55a1654626"
1758+
},
1759+
{
1760+
"name": "Booleans",
1761+
"slug": "booleans",
1762+
"uuid": "e3942921-34ec-41eb-a999-a5d85a6623fd"
1763+
},
1764+
{
1765+
"name": "Comments",
1766+
"slug": "comments",
1767+
"uuid": "9ee93eab-b413-442c-b7fb-76bf044eea2d"
1768+
},
1769+
{
1770+
"name": "Conditionals If",
1771+
"slug": "conditionals-if",
1772+
"uuid": "b3731323-f5bb-4b38-931c-2d734667bf8d"
1773+
},
1774+
{
1775+
"name": "Conditionals Switch",
1776+
"slug": "conditionals-switch",
1777+
"uuid": "6a4103e0-e7a9-427e-b1bd-716870580c45"
1778+
},
1779+
{
1780+
"name": "Constants",
1781+
"slug": "constants",
1782+
"uuid": "b56f68de-44ef-4bd4-8b14-2c50b2a366dd"
1783+
},
1784+
{
1785+
"name": "Errors",
1786+
"slug": "errors",
1787+
"uuid": "a960da78-c940-4725-8069-929f42564cdb"
1788+
},
1789+
{
1790+
"name": "Iteration",
1791+
"slug": "iteration",
1792+
"uuid": "e18ca160-bbb8-4cd0-882a-0e67f1e60b47"
1793+
},
1794+
{
1795+
"name": "Maps",
1796+
"slug": "maps",
1797+
"uuid": "625aa065-b006-4fc5-b276-28e048376b46"
1798+
},
1799+
{
1800+
"name": "Methods",
1801+
"slug": "methods",
1802+
"uuid": "d25c6e6b-c6d4-40ce-80f9-cecbc5a72254"
1803+
},
1804+
{
1805+
"name": "Nil",
1806+
"slug": "nil",
1807+
"uuid": "c4d16fac-3e46-41ac-adf8-ce8f3f73f745"
1808+
},
1809+
{
1810+
"name": "Numbers",
1811+
"slug": "numbers",
1812+
"uuid": "82cff17e-88cd-4707-a6d7-b5143251f029"
1813+
},
1814+
{
1815+
"name": "Slices",
1816+
"slug": "slices",
1817+
"uuid": "23e1c40a-300c-4a44-bc32-f3440a057216"
1818+
},
1819+
{
1820+
"name": "Strings",
1821+
"slug": "strings",
1822+
"uuid": "eeae05c6-b751-44a2-b843-517ec7b83ef7"
1823+
},
1824+
{
1825+
"name": "Strings Package",
1826+
"slug": "strings-package",
1827+
"uuid": "33708451-a03f-44ce-be05-eaacc1d5793c"
1828+
},
1829+
{
1830+
"name": "Structs",
1831+
"slug": "structs",
1832+
"uuid": "5bd431cf-c30d-4f5c-a16d-c62e51720fbd"
1833+
},
1834+
{
1835+
"name": "Time",
1836+
"slug": "time",
1837+
"uuid": "4673000c-7822-4252-88c5-723f47d6ad06"
1838+
},
1839+
{
1840+
"name": "Type Conversion",
1841+
"slug": "type-conversion",
1842+
"uuid": "4f3d535e-cec8-4303-ac5a-ed91a53bd594"
1843+
},
1844+
{
1845+
"name": "Zero Values",
1846+
"slug": "zero-values",
1847+
"uuid": "a50b4ed6-6198-4ab2-8075-3770900db4c9"
15741848
}
15751849
],
15761850
"key_features": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"blurb": "Learn about booleans by helping Annalyn free her best friend.",
3+
"authors": [
4+
"oanaOM"
5+
],
6+
"forked_from": [
7+
"csharp/annalyns-infiltration"
8+
],
9+
"files": {
10+
"solution": [
11+
"annalyns_infiltration.go"
12+
],
13+
"test": [
14+
"annalyns_infiltration_test.go"
15+
],
16+
"exemplar": [
17+
".meta/exemplar.go"
18+
]
19+
}
20+
}

exercises/concept/booleans/.meta/exemplar.go renamed to exercises/concept/annalyns-infiltration/.meta/exemplar.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package booleans
1+
package annalyn
22

33
// CanFastAttack can be executed only when the knight is sleeping
44
func CanFastAttack(knightIsAwake bool) bool {

exercises/concept/booleans/booleans.go renamed to exercises/concept/annalyns-infiltration/annalyns_infiltration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package booleans
1+
package annalyn
22

33
// CanFastAttack can be executed only when the knight is sleeping
44
func CanFastAttack(knightIsAwake bool) bool {

exercises/concept/booleans/booleans_test.go renamed to exercises/concept/annalyns-infiltration/annalyns_infiltration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package booleans
1+
package annalyn
22

33
import "testing"
44

exercises/concept/conditionals/.docs/introduction.md renamed to exercises/concept/blackjack/.docs/introduction.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Introduction
22

3-
## Conditionals If
4-
5-
## Conditionals Switch
6-
7-
## Booleans
3+
Conditionals in Go are similar to conditionals in other languages. The underlying type of any conditional operation is the `bool` type, which can have the value of `true` or `false`. Conditionals are often used as flow control mechanisms to check for various conditions.
84

9-
Go supports the three logical operators `&&` (AND), `||` (OR), and `!` (NOT).
5+
## Conditionals If
106

11-
Conditionals in Go are similar to conditionals in other languages. The underlying type of any conditional operation is the `bool` type, which can have the value of `true` or `false`. Conditionals are often used as flow control mechanisms to check for various conditions. For checking a particular case an `if` statement can be used, which executes its code if the underlying condition is `true` like this:
7+
For checking a particular case an `if` statement can be used, which executes its code if the underlying condition is `true` like this:
128

139
```go
1410
var value string
@@ -30,6 +26,8 @@ if value == "val" {
3026
}
3127
```
3228

29+
## Conditionals Switch
30+
3331
Go also provides a `switch` statement for more advanced scenarios.
3432

3533
```go

0 commit comments

Comments
 (0)