Your friend is great at handling trains, although they aren’t amazing at handling the logistics computers and would like your programming help organizing the train and correcting mistakes in the data.
- This sentence is rather long; consider breaking it up.
- The connector word “although” suggests that the two ideas are in some ways at odds with each other; “however” or “but” might be a better choice.
- The terms “logistics computers” and “programming help” add complexity without value. Simpler terms like “computers” and “help” convey the same amount of information with less complexity.
However, we’d like you to practice using Unpacking and Multiple Assignment to solve each of the tasks below.
I don’t believe “Unpacking” or “Multiple Assignments” are proper nouns and, as such, should not be capitalized.
Your friend has been keeping track of each wagon identifier, but they’re never sure how many wagons they are going to have to process at any given time.
I’ve been taught to avoid contractions in documentation and formal writing. I’m not sure how formal you would consider exercise prose but I generally avoid them in the Exercism writing I’ve done. This applies to other locations in the docs, too.
It would be much easier for the rest of the logistics program to have the data to be returned as a list
.
“have … to be” is incorrect grammar. This could be, “It would be easier to have the data returned as a list
.” or even, “It would be easier to have the data as a list
.”
Implement a function get_list_of_wagons
that accepts an arbitrary amount of positive integers which are the IDs of each wagon. It should then return the given IDs as a list
.
This article says,
Although number and amount have similar meanings, number is used for things that can be counted, while amount is used for things that cannot be counted.
The function should take a number of values, not an amount.
This exercise discusses identities previously. Prefer sticking to identities over “IDs” or define “IDs”, e.g. "identities (IDs).
In American English, trains have cars, not wagons. I’m not sure if that holds true elsewhere.
Implement a function get_list_of_wagons
that accepts an arbitrary amount of positive integers which are the IDs of each wagon. It should then return the given IDs as a list
.
“It should then” implies the function first does something (active action) then returns the list. “Accepts” is not an active action.
The train ID system works by assigning the locomotive an ID of 1
It might be worth explaining the term “locomotive”.
But then your friend had to connect two new wagons to the train and forgot to update the system!
“But” and “then” are used to connect ideas; they should not be used to start a sentence.
Now the first two wagons in the list
The list contains wagon IDs, not wagons 
All they can remember is that once the new wagons are moved to the end, the values from the second list should be placed directly after the designated locomotive.
I’m not sure what this means. Does each list have a locomotive? Which one is designated? Designated in what sense? Are the “new” wagons the second list? The word “new” isn’t used previously.
The function should then return
the list
with the modifications.
The word return
is used many times but mostly not monospaced. It would be good to be consistent.
>>> fix_list_of_wagons([2, 5, 1, 7, 4, 12, 6, 3, 13], [3, 17, 6, 15])
This example is rather long. Examples are usually easiest to read when they have enough data to illustrate the problem, but no more.
the routing dict
a routing dict
The docs reference both “the” and “a” routing dict
.
The function should then return the routing dict, updated with a key that holds a list of all the stops in order.
Should “list” be “list
”?
Implement a function extend_route_information
that accepts two dicts
.
Should that be dict
s?
The first dict contains which cities the train route moves between.
Routes don’t move. The train moved between cities. The route contains cities.
The function should return a consolidated dict with all routing information.
Is this missing “the”? “The function should return a consolidated dict with all the routing information.”
The second dict can contain different properties than the ones shown in the example.
Should that be dict
?
Wagons are stored in the depot in grids, with each column in the grid grouped by wagon color.
Are the columns grouped? Or are the wagons grouped into the columns?
“Wagons are stored in the depot in grids, with the wagons grouped by color into columns.”
But for the storage grid to work correctly
Sentences should not start with “but”.
a tuple
with (<wagon ID>
, <wagon color>
).
Tuple notation uses ()
so the parenthesis should be part of the syntax, i.e. " a tuple
with (<wagon ID>
, <wagon color>)
."
three row lists
Should that be list
s?
[
[(2, "red"),(5, "blue"),(3, "orange")],
[(4, "red"),(9, "blue"),(7, "orange")],
[(8, "red"),(13,"blue"),(11, "orange")]
]
Should the contents of the list be indented?