Skip to content

Commit d22877f

Browse files
authored
Fix misspelling of 'aisle' as 'isle' (exercism#3619)
1 parent 9d7aba4 commit d22877f

4 files changed

Lines changed: 50 additions & 50 deletions

File tree

exercises/concept/mecha-munch-management/.docs/instructions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Create the function `add_items(<current_cart>, <items_to_add>)` that takes a car
1717
It should return a new/updated shopping cart dictionary for the user.
1818

1919
```python
20-
>>> add_items({'Banana': 3, 'Apple': 2, 'Orange': 1},
20+
>>> add_items({'Banana': 3, 'Apple': 2, 'Orange': 1},
2121
('Apple', 'Apple', 'Orange', 'Apple', 'Banana'))
2222
{'Banana': 4, 'Apple': 5, 'Orange': 2}
2323

24-
>>> add_items({'Banana': 3, 'Apple': 2, 'Orange': 1},
24+
>>> add_items({'Banana': 3, 'Apple': 2, 'Orange': 1},
2525
['Banana', 'Orange', 'Blueberries', 'Banana'])
2626
{'Banana': 5, 'Apple': 2, 'Orange': 2, 'Blueberries': 1}
2727
```
@@ -102,9 +102,9 @@ The function should `return` a combined "fulfillment cart" that has (quantity, a
102102
Items should appear in _reverse_ alphabetical order.
103103

104104
```python
105-
>>> send_to_store({'Banana': 3, 'Apple': 2, 'Orange': 1, 'Milk': 2},
106-
{'Banana': ['Isle 5', False], 'Apple': ['Isle 4', False], 'Orange': ['Isle 4', False], 'Milk': ['Isle 2', True]})
107-
{'Orange': [1, 'Isle 4', False], 'Milk': [2, 'Isle 2', True], 'Banana': [3, 'Isle 5', False], 'Apple': [2, 'Isle 4', False]}
105+
>>> send_to_store({'Banana': 3, 'Apple': 2, 'Orange': 1, 'Milk': 2},
106+
{'Banana': ['Aisle 5', False], 'Apple': ['Aisle 4', False], 'Orange': ['Aisle 4', False], 'Milk': ['Aisle 2', True]})
107+
{'Orange': [1, 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True], 'Banana': [3, 'Aisle 5', False], 'Apple': [2, 'Aisle 4', False]}
108108
```
109109

110110
## 6. Update the Store Inventory to Reflect what a User Has Ordered.
@@ -119,10 +119,10 @@ The function should reduce the store inventory amounts by the number "ordered" i
119119
Where a store item count falls to 0, the count should be replaced by the message 'Out of Stock'.
120120

121121
```python
122-
>>> update_store_inventory({'Orange': [1, 'Isle 4', False], 'Milk': [2, 'Isle 2', True], 'Banana': [3, 'Isle 5', False], 'Apple': [2, 'Isle 4', False]},
123-
{'Banana': [15, 'Isle 5', False], 'Apple': [12, 'Isle 4', False], 'Orange': [1, 'Isle 4', False], 'Milk': [4, 'Isle 2', True]})
122+
>>> update_store_inventory({'Orange': [1, 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True], 'Banana': [3, 'Aisle 5', False], 'Apple': [2, 'Aisle 4', False]},
123+
{'Banana': [15, 'Aisle 5', False], 'Apple': [12, 'Aisle 4', False], 'Orange': [1, 'Aisle 4', False], 'Milk': [4, 'Aisle 2', True]})
124124

125-
{'Banana': [12, 'Isle 5', False], 'Apple': [10, 'Isle 4', False], 'Orange': ['Out of Stock', 'Isle 4', False], 'Milk': [2, 'Isle 2', True]}
125+
{'Banana': [12, 'Aisle 5', False], 'Apple': [10, 'Aisle 4', False], 'Orange': ['Out of Stock', 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True]}
126126
```
127127

128128
[feature creep]: https://en.wikipedia.org/wiki/Feature_creep

exercises/concept/mecha-munch-management/.meta/exemplar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ def sort_entries(cart):
4848
return dict(sorted(cart.items()))
4949

5050

51-
def send_to_store(cart, isle_mapping):
52-
"""Combine users order to isle and refrigeration information.
51+
def send_to_store(cart, aisle_mapping):
52+
"""Combine users order to aisle and refrigeration information.
5353
5454
:param cart: dict - users shopping cart dictionary.
55-
:param isle_mapping: dict - isle and refrigeration information dictionary.
55+
:param aisle_mapping: dict - aisle and refrigeration information dictionary.
5656
:return: dict - fulfillment dictionary ready to send to store.
5757
"""
5858
fulfillment_cart = {}
5959

6060
for key in cart.keys():
61-
fulfillment_cart[key] = [cart[key]] + isle_mapping[key]
61+
fulfillment_cart[key] = [cart[key]] + aisle_mapping[key]
6262

6363
return dict(sorted(fulfillment_cart.items(), reverse=True))
6464

exercises/concept/mecha-munch-management/dict_methods.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ def sort_entries(cart):
4343
pass
4444

4545

46-
def send_to_store(cart, isle_mapping):
47-
"""Combine users order to isle and refrigeration information.
46+
def send_to_store(cart, aisle_mapping):
47+
"""Combine users order to aisle and refrigeration information.
4848
4949
:param cart: dict - users shopping cart dictionary.
50-
:param isle_mapping: dict - isle and refrigeration information dictionary.
50+
:param aisle_mapping: dict - aisle and refrigeration information dictionary.
5151
:return: dict - fulfillment dictionary ready to send to store.
5252
"""
5353

exercises/concept/mecha-munch-management/dict_methods_test.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -122,31 +122,31 @@ def test_sort_entries(self):
122122
def test_send_to_store(self):
123123
input_data = [
124124
({'Banana': 3, 'Apple': 2, 'Orange': 1, 'Milk': 2},
125-
{'Banana': ['Isle 5', False], 'Apple': ['Isle 4', False],
126-
'Orange': ['Isle 4', False], 'Milk': ['Isle 2', True]}),
125+
{'Banana': ['Aisle 5', False], 'Apple': ['Aisle 4', False],
126+
'Orange': ['Aisle 4', False], 'Milk': ['Aisle 2', True]}),
127127

128128
({'Kiwi': 3, 'Juice': 5, 'Yoghurt': 2, 'Milk': 5},
129-
{'Kiwi': ['Isle 6', False], 'Juice': ['Isle 5', False],
130-
'Yoghurt': ['Isle 2', True], 'Milk': ['Isle 2', True]}),
129+
{'Kiwi': ['Aisle 6', False], 'Juice': ['Aisle 5', False],
130+
'Yoghurt': ['Aisle 2', True], 'Milk': ['Aisle 2', True]}),
131131

132132
({'Apple': 2, 'Raspberry': 2, 'Blueberries': 5,
133133
'Broccoli' : 2, 'Kiwi': 1, 'Melon': 4},
134134

135-
{'Apple': ['Isle 1', False], 'Raspberry': ['Isle 6', False],
136-
'Blueberries': ['Isle 6', False], 'Broccoli': ['Isle 3', False],
137-
'Kiwi': ['Isle 6', False], 'Melon': ['Isle 6', False]})
135+
{'Apple': ['Aisle 1', False], 'Raspberry': ['Aisle 6', False],
136+
'Blueberries': ['Aisle 6', False], 'Broccoli': ['Aisle 3', False],
137+
'Kiwi': ['Aisle 6', False], 'Melon': ['Aisle 6', False]})
138138
]
139139

140140
output_data = [
141-
{'Orange': [1, 'Isle 4', False], 'Milk': [2, 'Isle 2', True],
142-
'Banana': [3, 'Isle 5', False], 'Apple': [2, 'Isle 4', False]},
141+
{'Orange': [1, 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True],
142+
'Banana': [3, 'Aisle 5', False], 'Apple': [2, 'Aisle 4', False]},
143143

144-
{'Yoghurt': [2, 'Isle 2', True], 'Milk': [5, 'Isle 2', True],
145-
'Kiwi': [3, 'Isle 6', False], 'Juice': [5, 'Isle 5', False]},
144+
{'Yoghurt': [2, 'Aisle 2', True], 'Milk': [5, 'Aisle 2', True],
145+
'Kiwi': [3, 'Aisle 6', False], 'Juice': [5, 'Aisle 5', False]},
146146

147-
{'Raspberry': [2, 'Isle 6', False], 'Melon': [4, 'Isle 6', False],
148-
'Kiwi': [1, 'Isle 6', False], 'Broccoli': [2, 'Isle 3', False],
149-
'Blueberries': [5, 'Isle 6', False], 'Apple': [2, 'Isle 1', False]}
147+
{'Raspberry': [2, 'Aisle 6', False], 'Melon': [4, 'Aisle 6', False],
148+
'Kiwi': [1, 'Aisle 6', False], 'Broccoli': [2, 'Aisle 3', False],
149+
'Blueberries': [5, 'Aisle 6', False], 'Apple': [2, 'Aisle 1', False]}
150150
]
151151

152152
for variant, (input_data, expected) in enumerate(zip(input_data, output_data), start=1):
@@ -164,32 +164,32 @@ def test_send_to_store(self):
164164
@pytest.mark.task(taskno=6)
165165
def test_update_store_inventory(self):
166166
input_data = [
167-
({'Orange': [1, 'Isle 4', False], 'Milk': [2, 'Isle 2', True],
168-
'Banana': [3, 'Isle 5', False], 'Apple': [2, 'Isle 4', False]},
169-
{'Banana': [15, 'Isle 5', False], 'Apple': [12, 'Isle 4', False],
170-
'Orange': [1, 'Isle 4', False], 'Milk': [4, 'Isle 2', True]}),
171-
172-
({'Kiwi': [3, 'Isle 6', False]},{'Kiwi': [3, 'Isle 6', False], 'Juice': [5, 'Isle 5', False],
173-
'Yoghurt': [2, 'Isle 2', True], 'Milk': [5, 'Isle 2', True]}),
174-
175-
({'Kiwi': [1, 'Isle 6', False], 'Melon': [4, 'Isle 6', False], 'Apple': [2, 'Isle 1', False],
176-
'Raspberry': [2, 'Isle 6', False], 'Blueberries': [5, 'Isle 6', False],
177-
'Broccoli': [1, 'Isle 3', False]},
178-
{'Apple': [2, 'Isle 1', False], 'Raspberry': [5, 'Isle 6', False],
179-
'Blueberries': [10, 'Isle 6', False], 'Broccoli': [4, 'Isle 3', False],
180-
'Kiwi': [1, 'Isle 6', False], 'Melon': [8, 'Isle 6', False]})
167+
({'Orange': [1, 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True],
168+
'Banana': [3, 'Aisle 5', False], 'Apple': [2, 'Aisle 4', False]},
169+
{'Banana': [15, 'Aisle 5', False], 'Apple': [12, 'Aisle 4', False],
170+
'Orange': [1, 'Aisle 4', False], 'Milk': [4, 'Aisle 2', True]}),
171+
172+
({'Kiwi': [3, 'Aisle 6', False]},{'Kiwi': [3, 'Aisle 6', False], 'Juice': [5, 'Aisle 5', False],
173+
'Yoghurt': [2, 'Aisle 2', True], 'Milk': [5, 'Aisle 2', True]}),
174+
175+
({'Kiwi': [1, 'Aisle 6', False], 'Melon': [4, 'Aisle 6', False], 'Apple': [2, 'Aisle 1', False],
176+
'Raspberry': [2, 'Aisle 6', False], 'Blueberries': [5, 'Aisle 6', False],
177+
'Broccoli': [1, 'Aisle 3', False]},
178+
{'Apple': [2, 'Aisle 1', False], 'Raspberry': [5, 'Aisle 6', False],
179+
'Blueberries': [10, 'Aisle 6', False], 'Broccoli': [4, 'Aisle 3', False],
180+
'Kiwi': [1, 'Aisle 6', False], 'Melon': [8, 'Aisle 6', False]})
181181
]
182182

183183
output_data = [
184-
{'Banana': [12, 'Isle 5', False], 'Apple': [10, 'Isle 4', False],
185-
'Orange': ['Out of Stock', 'Isle 4', False], 'Milk': [2, 'Isle 2', True]},
184+
{'Banana': [12, 'Aisle 5', False], 'Apple': [10, 'Aisle 4', False],
185+
'Orange': ['Out of Stock', 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True]},
186186

187-
{'Juice': [5, 'Isle 5', False], 'Yoghurt': [2, 'Isle 2', True],
188-
'Milk': [5, 'Isle 2', True], 'Kiwi': ["Out of Stock", 'Isle 6', False]},
187+
{'Juice': [5, 'Aisle 5', False], 'Yoghurt': [2, 'Aisle 2', True],
188+
'Milk': [5, 'Aisle 2', True], 'Kiwi': ["Out of Stock", 'Aisle 6', False]},
189189

190-
{'Kiwi': ['Out of Stock', 'Isle 6', False], 'Melon': [4, 'Isle 6', False],
191-
'Apple': ['Out of Stock', 'Isle 1', False], 'Raspberry': [3, 'Isle 6', False],
192-
'Blueberries': [5, 'Isle 6', False], 'Broccoli': [3, 'Isle 3', False]}
190+
{'Kiwi': ['Out of Stock', 'Aisle 6', False], 'Melon': [4, 'Aisle 6', False],
191+
'Apple': ['Out of Stock', 'Aisle 1', False], 'Raspberry': [3, 'Aisle 6', False],
192+
'Blueberries': [5, 'Aisle 6', False], 'Broccoli': [3, 'Aisle 3', False]}
193193
]
194194

195195
for variant, (input_data, expected) in enumerate(zip(input_data, output_data), start=1):

0 commit comments

Comments
 (0)