Skip to content

Commit ff82bc0

Browse files
authored
[Mecha Munch Management]: Typo & formatting fixes to documentation (exercism#4166)
* Typo and formatting fixes as outlined on https://forum.exercism.org/t/mecha-munch-management-typos/48413. * Deleted unneeded test file.
1 parent 6202cef commit ff82bc0

6 files changed

Lines changed: 25 additions & 25 deletions

File tree

concepts/dict-methods/about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Where keys in the two dictionaries _overlap_, the `value` in `dict_one` will be
188188
'Green Treeline': '#478559', 'Purple baseline': '#161748'}
189189
```
190190

191-
## Merge or Update Dictionaries Via the Union (`|`) Operators
191+
## Merge or Update Dictionaries Using Union (`|` and `|=`) Operators
192192

193193
Python 3.9 introduces a different means of merging `dicts`: the `union` operators.
194194
`dict_one | dict_two` will create a **new dictionary**, made up of the (`key`, `value`) pairs of `dict_one` and `dict_two`.
@@ -271,7 +271,7 @@ Unless a _sort key_ is specified, the default sort is over dictionary `keys`.
271271
'Misty Mountain Pink': '#f9c5bd'}
272272
```
273273

274-
## Transposing a Dictionaries Keys and Values
274+
## Transposing Dictionary Keys and Values
275275

276276
Swapping keys and values reliably in a dictionary takes a little work, but can be accomplished via a `loop` using `dict.items()` or in a dictionary comprehension.
277277
Safe swapping assumes that `dict` keys and values are both _hashable_.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ It's OK to be simple and direct with the functions you are writing.
99
The dictionary section of the [official tutorial][dicts-docs] and the mapping type [official library reference][mapping-types-dict] are excellent places to look for more help with all these methods.
1010

1111

12-
## 1. Add Item(s) to the Users Shopping Cart
12+
## 1. Add Item(s) to the User's Shopping Cart
1313

1414
- You will need to iterate through each item in `items_to_add`.
1515
- You can avoid a `KeyError` when a key is missing by using a `dict` [method][set-default] that takes a _default value_ as one of its arguments.
1616
- It is also possible to accomplish the same thing manually in the `loop` by using some checking and error handling, but the `dict` method is easier.
1717

18-
## 2. Read in Items Listed in the Users Notes App
18+
## 2. Read in Items Listed in the User's Notes App
1919

2020
- Remember, Python's got a method for _everything_. This one is a _classmethod_ that's an easy way to [populate a `dict`][fromkeys] with keys.
2121
- This `dict` method returns a _new dictionary_, populated with default values. If no value is given, the default value will become `None`
@@ -25,13 +25,13 @@ The dictionary section of the [official tutorial][dicts-docs] and the mapping ty
2525
- Don't overthink this one! This can be solved in **one** `dict` method call.
2626
- The key word here is .... [_update_][update].
2727

28-
## 4. Sort the Items in the User Cart
28+
## 4. Sort the Items in the User's Cart
2929

3030
- What method would you call to get an [iterable view of items][items] in the dictionary?
3131
- If you had a `list` or a `tuple`, what [`built-in`][builtins] function might you use to sort them?
3232
- The built-in function you want is the one that returns a _copy_, and doesn't mutate the original.
3333

34-
## 5. Send User Shopping Cart to Store for Fulfillment
34+
## 5. Send the User's Shopping Cart to the Store for Fulfillment
3535

3636
- Having a fresh, empty dictionary here as the `fulfillment_cart` might be handy for adding in items.
3737
- `Looping` through the members of the cart might be the most direct way of accessing things here.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Instructions
22

3-
Mecha Munch™, a grocery shopping automation company has just hired you to work on their ordering app.
3+
Mecha Munch™, a grocery shopping automation company, has just hired you to work on their ordering app.
44
Your team is tasked with building an MVP (_[minimum viable product][mvp]_) that manages all the basic shopping cart activities, allowing users to add, remove, and sort their grocery orders.
55
Thankfully, a different team is handling all the money and check-out functions!
66

7-
## 1. Add Item(s) to the Users Shopping Cart
7+
## 1. Add Item(s) to the User's Shopping Cart
88

99
The MVP should allow the user to add items to their shopping cart.
1010
This could be a single item or multiple items at once.
@@ -26,12 +26,12 @@ It should return a new/updated shopping cart dictionary for the user.
2626
{'Banana': 5, 'Apple': 2, 'Orange': 2, 'Blueberries': 1}
2727
```
2828

29-
## 2. Read in Items Listed in the Users Notes App
29+
## 2. Read in Items Listed in the User's Notes App
3030

3131
Uh-oh.
3232
Looks like the product team is engaging in [feature creep][feature creep].
3333
They want to add extra functionality to the MVP.
34-
The application now has to create a shopping cart by reading items off a users notes app.
34+
The application now has to create a shopping cart by reading items off a user's notes app.
3535
Convenient for the users, but slightly more work for the team.
3636

3737
Create the function `read_notes(<notes>)` that can take any list-like iterable as an argument.
@@ -97,7 +97,7 @@ Create the function `sort_entries(<cart>)` that takes a shopping cart/dictionary
9797

9898
## 5. Send User Shopping Cart to Store for Fulfillment
9999

100-
The app needs to send a given users cart to the store for fulfillment.
100+
The app needs to send a given user's cart to the store for fulfillment.
101101
However, the shoppers in the store need to know which store aisle the item can be found in and if the item needs refrigeration.
102102
So (_rather arbitrarily_) the "fulfillment cart" needs to be sorted in reverse alphabetical order with item quantities combined with location and refrigeration information.
103103

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Where keys in the two dictionaries _overlap_, the `value` in `dict_one` will be
171171
'Green Treeline': '#478559', 'Purple baseline': '#161748'}
172172
```
173173

174-
## Merge or Update Dictionaries Via the Union (`|`) Operators
174+
## Merge or Update Dictionaries Using Union (`|` and `|=`) Operators
175175

176176
Python 3.9 introduces a different means of merging `dicts`: the `union` operators.
177177
`dict_one | dict_two` will create a **new dictionary**, made up of the (`key`, `value`) pairs of `dict_one` and `dict_two`.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ def update_recipes(ideas, recipe_updates):
4848

4949

5050
def sort_entries(cart):
51-
"""Sort a users shopping cart in alphabetically order.
51+
"""Sort a user's shopping cart in alphabetical order.
5252
53-
Parameters:
54-
cart (dict): A users shopping cart dictionary.
53+
Parameters:
54+
cart (dict): A user's shopping cart dictionary.
5555
56-
Returns:
57-
dict: A sers shopping cart sorted in alphabetical order.
58-
"""
56+
Returns:
57+
dict: A user's shopping cart sorted in alphabetical order.
58+
"""
5959

6060
return dict(sorted(cart.items()))
6161

6262

6363
def send_to_store(cart, aisle_mapping):
64-
"""Combine users order to aisle and refrigeration information.
64+
"""Combine user's order to aisle and refrigeration information.
6565
6666
Parameters:
67-
cart (dict): The users shopping cart dictionary.
67+
cart (dict): The user's shopping cart dictionary.
6868
aisle_mapping (dict): The aisle and refrigeration information dictionary.
6969
7070
Returns:

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,23 @@ def update_recipes(ideas, recipe_updates):
4343

4444

4545
def sort_entries(cart):
46-
"""Sort a users shopping cart in alphabetically order.
46+
"""Sort a user's shopping cart in alphabetical order.
4747
4848
Parameters:
49-
cart (dict): A users shopping cart dictionary.
49+
cart (dict): A user's shopping cart dictionary.
5050
5151
Returns:
52-
dict: A sers shopping cart sorted in alphabetical order.
52+
dict: A user's shopping cart sorted in alphabetical order.
5353
"""
5454

5555
pass
5656

5757

5858
def send_to_store(cart, aisle_mapping):
59-
"""Combine users order to aisle and refrigeration information.
59+
"""Combine user's order to aisle and refrigeration information.
6060
6161
Parameters:
62-
cart (dict): The users shopping cart dictionary.
62+
cart (dict): The user's shopping cart dictionary.
6363
aisle_mapping (dict): The aisle and refrigeration information dictionary.
6464
6565
Returns:

0 commit comments

Comments
 (0)