Files
python/exercises/concept/locomotive-engineer/locomotive_engineer.py

50 lines
1.2 KiB
Python
Raw Normal View History

[New Concept Exercise] : Linus the Locomotive Engineer (Packing, Unpacking and Multiple Assignment) (#3212) * Update introduction.md * Update about.md * Added authers * Added filles for exercise * Progress * Merged 2 and 3 * typo fix * Fix file_names and added tests for 1 exericse * Update locomotive_engineer.py * Added zip, added tests for exercise 2 * Adds test for exercise for 3 and 4 * fixes * Added fifth exercise * Fix typo * Adding Exercise Slug to Config.json Added exercise to track config. * Blurb and Design Doc Expanded the blurb and added in the design notes. * Placeholder for concept intro and task changes Put in placeholder for concept intro (still needs editing down). Re-arranged task 2. Attempted to re-arrange task 5 (still working on it) * fixes * Further updates to task 5 * fix * Updated test for exericse 5 * Update instructions.md * uypdated exercise 3 * Updated task instructions * removed notes * Added more tests for exercise 5 * Updated exercise intro and concept intro * Added some more hints * Added more hints * some more * Added blurb * Added Links Also edited exemplar and a few other things. * Small updates Rephrased the unpacking definition across about.md, introduction.md, and the concept blurb. * spell fixes * spell fix * Replaced array with list * fix typo * Swapped although * fix typos * fix * Grammar and Rephrasing for About.md * additional edits for *args **kwargs * Adjustments line 273 and 145 * Update about.md * Final Edits Final edits before community review. Includes multiple potential solutions to task 5. When done reviewing/selecting the code for the exemplar, please delete the code in the stub file and un-comment the stubbed functions and docstrings. Thanks! * Blurb Edit `dictionary` to `dict`. * UnEdit Forgot we can't use backticks in a blurb, so needed to remove them. * Clean up * Uncomment stub Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2022-11-24 08:30:37 +01:00
"""Functions which helps the locomotive engineer to keep track of the train."""
2022-11-27 20:47:00 +01:00
def get_list_of_wagons():
"""Return a list of wagons.
:param: arbitrary number of wagons.
:return: list - list of wagons.
"""
pass
[New Concept Exercise] : Linus the Locomotive Engineer (Packing, Unpacking and Multiple Assignment) (#3212) * Update introduction.md * Update about.md * Added authers * Added filles for exercise * Progress * Merged 2 and 3 * typo fix * Fix file_names and added tests for 1 exericse * Update locomotive_engineer.py * Added zip, added tests for exercise 2 * Adds test for exercise for 3 and 4 * fixes * Added fifth exercise * Fix typo * Adding Exercise Slug to Config.json Added exercise to track config. * Blurb and Design Doc Expanded the blurb and added in the design notes. * Placeholder for concept intro and task changes Put in placeholder for concept intro (still needs editing down). Re-arranged task 2. Attempted to re-arrange task 5 (still working on it) * fixes * Further updates to task 5 * fix * Updated test for exericse 5 * Update instructions.md * uypdated exercise 3 * Updated task instructions * removed notes * Added more tests for exercise 5 * Updated exercise intro and concept intro * Added some more hints * Added more hints * some more * Added blurb * Added Links Also edited exemplar and a few other things. * Small updates Rephrased the unpacking definition across about.md, introduction.md, and the concept blurb. * spell fixes * spell fix * Replaced array with list * fix typo * Swapped although * fix typos * fix * Grammar and Rephrasing for About.md * additional edits for *args **kwargs * Adjustments line 273 and 145 * Update about.md * Final Edits Final edits before community review. Includes multiple potential solutions to task 5. When done reviewing/selecting the code for the exemplar, please delete the code in the stub file and un-comment the stubbed functions and docstrings. Thanks! * Blurb Edit `dictionary` to `dict`. * UnEdit Forgot we can't use backticks in a blurb, so needed to remove them. * Clean up * Uncomment stub Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2022-11-24 08:30:37 +01:00
def fix_list_of_wagons(each_wagons_id, missing_wagons):
"""Fix the list of wagons.
:param each_wagons_id: list - the list of wagons.
:param missing_wagons: list - the list of missing wagons.
[New Concept Exercise] : Linus the Locomotive Engineer (Packing, Unpacking and Multiple Assignment) (#3212) * Update introduction.md * Update about.md * Added authers * Added filles for exercise * Progress * Merged 2 and 3 * typo fix * Fix file_names and added tests for 1 exericse * Update locomotive_engineer.py * Added zip, added tests for exercise 2 * Adds test for exercise for 3 and 4 * fixes * Added fifth exercise * Fix typo * Adding Exercise Slug to Config.json Added exercise to track config. * Blurb and Design Doc Expanded the blurb and added in the design notes. * Placeholder for concept intro and task changes Put in placeholder for concept intro (still needs editing down). Re-arranged task 2. Attempted to re-arrange task 5 (still working on it) * fixes * Further updates to task 5 * fix * Updated test for exericse 5 * Update instructions.md * uypdated exercise 3 * Updated task instructions * removed notes * Added more tests for exercise 5 * Updated exercise intro and concept intro * Added some more hints * Added more hints * some more * Added blurb * Added Links Also edited exemplar and a few other things. * Small updates Rephrased the unpacking definition across about.md, introduction.md, and the concept blurb. * spell fixes * spell fix * Replaced array with list * fix typo * Swapped although * fix typos * fix * Grammar and Rephrasing for About.md * additional edits for *args **kwargs * Adjustments line 273 and 145 * Update about.md * Final Edits Final edits before community review. Includes multiple potential solutions to task 5. When done reviewing/selecting the code for the exemplar, please delete the code in the stub file and un-comment the stubbed functions and docstrings. Thanks! * Blurb Edit `dictionary` to `dict`. * UnEdit Forgot we can't use backticks in a blurb, so needed to remove them. * Clean up * Uncomment stub Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2022-11-24 08:30:37 +01:00
:return: list - list of wagons.
"""
pass
2022-11-27 20:47:00 +01:00
def add_missing_stops():
"""Add missing stops to route dict.
:param route: dict - the dict of routing information.
:param: arbitrary number of stops.
:return: dict - updated route dictionary.
"""
pass
[New Concept Exercise] : Linus the Locomotive Engineer (Packing, Unpacking and Multiple Assignment) (#3212) * Update introduction.md * Update about.md * Added authers * Added filles for exercise * Progress * Merged 2 and 3 * typo fix * Fix file_names and added tests for 1 exericse * Update locomotive_engineer.py * Added zip, added tests for exercise 2 * Adds test for exercise for 3 and 4 * fixes * Added fifth exercise * Fix typo * Adding Exercise Slug to Config.json Added exercise to track config. * Blurb and Design Doc Expanded the blurb and added in the design notes. * Placeholder for concept intro and task changes Put in placeholder for concept intro (still needs editing down). Re-arranged task 2. Attempted to re-arrange task 5 (still working on it) * fixes * Further updates to task 5 * fix * Updated test for exericse 5 * Update instructions.md * uypdated exercise 3 * Updated task instructions * removed notes * Added more tests for exercise 5 * Updated exercise intro and concept intro * Added some more hints * Added more hints * some more * Added blurb * Added Links Also edited exemplar and a few other things. * Small updates Rephrased the unpacking definition across about.md, introduction.md, and the concept blurb. * spell fixes * spell fix * Replaced array with list * fix typo * Swapped although * fix typos * fix * Grammar and Rephrasing for About.md * additional edits for *args **kwargs * Adjustments line 273 and 145 * Update about.md * Final Edits Final edits before community review. Includes multiple potential solutions to task 5. When done reviewing/selecting the code for the exemplar, please delete the code in the stub file and un-comment the stubbed functions and docstrings. Thanks! * Blurb Edit `dictionary` to `dict`. * UnEdit Forgot we can't use backticks in a blurb, so needed to remove them. * Clean up * Uncomment stub Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2022-11-24 08:30:37 +01:00
def extend_route_information(route, more_route_information):
2022-11-27 20:47:00 +01:00
"""Extend route information with more_route_information.
[New Concept Exercise] : Linus the Locomotive Engineer (Packing, Unpacking and Multiple Assignment) (#3212) * Update introduction.md * Update about.md * Added authers * Added filles for exercise * Progress * Merged 2 and 3 * typo fix * Fix file_names and added tests for 1 exericse * Update locomotive_engineer.py * Added zip, added tests for exercise 2 * Adds test for exercise for 3 and 4 * fixes * Added fifth exercise * Fix typo * Adding Exercise Slug to Config.json Added exercise to track config. * Blurb and Design Doc Expanded the blurb and added in the design notes. * Placeholder for concept intro and task changes Put in placeholder for concept intro (still needs editing down). Re-arranged task 2. Attempted to re-arrange task 5 (still working on it) * fixes * Further updates to task 5 * fix * Updated test for exericse 5 * Update instructions.md * uypdated exercise 3 * Updated task instructions * removed notes * Added more tests for exercise 5 * Updated exercise intro and concept intro * Added some more hints * Added more hints * some more * Added blurb * Added Links Also edited exemplar and a few other things. * Small updates Rephrased the unpacking definition across about.md, introduction.md, and the concept blurb. * spell fixes * spell fix * Replaced array with list * fix typo * Swapped although * fix typos * fix * Grammar and Rephrasing for About.md * additional edits for *args **kwargs * Adjustments line 273 and 145 * Update about.md * Final Edits Final edits before community review. Includes multiple potential solutions to task 5. When done reviewing/selecting the code for the exemplar, please delete the code in the stub file and un-comment the stubbed functions and docstrings. Thanks! * Blurb Edit `dictionary` to `dict`. * UnEdit Forgot we can't use backticks in a blurb, so needed to remove them. * Clean up * Uncomment stub Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2022-11-24 08:30:37 +01:00
:param route: dict - the route information.
:param more_route_information: dict - extra route information.
:return: dict - extended route information.
"""
pass
def fix_wagon_depot(wagons_rows):
"""Fix the list of rows of wagons.
2022-11-29 22:17:55 +01:00
:param wagons_rows: list[list[tuple]] - the list of rows of wagons.
:return: list[list[tuple]] - list of rows of wagons.
[New Concept Exercise] : Linus the Locomotive Engineer (Packing, Unpacking and Multiple Assignment) (#3212) * Update introduction.md * Update about.md * Added authers * Added filles for exercise * Progress * Merged 2 and 3 * typo fix * Fix file_names and added tests for 1 exericse * Update locomotive_engineer.py * Added zip, added tests for exercise 2 * Adds test for exercise for 3 and 4 * fixes * Added fifth exercise * Fix typo * Adding Exercise Slug to Config.json Added exercise to track config. * Blurb and Design Doc Expanded the blurb and added in the design notes. * Placeholder for concept intro and task changes Put in placeholder for concept intro (still needs editing down). Re-arranged task 2. Attempted to re-arrange task 5 (still working on it) * fixes * Further updates to task 5 * fix * Updated test for exericse 5 * Update instructions.md * uypdated exercise 3 * Updated task instructions * removed notes * Added more tests for exercise 5 * Updated exercise intro and concept intro * Added some more hints * Added more hints * some more * Added blurb * Added Links Also edited exemplar and a few other things. * Small updates Rephrased the unpacking definition across about.md, introduction.md, and the concept blurb. * spell fixes * spell fix * Replaced array with list * fix typo * Swapped although * fix typos * fix * Grammar and Rephrasing for About.md * additional edits for *args **kwargs * Adjustments line 273 and 145 * Update about.md * Final Edits Final edits before community review. Includes multiple potential solutions to task 5. When done reviewing/selecting the code for the exemplar, please delete the code in the stub file and un-comment the stubbed functions and docstrings. Thanks! * Blurb Edit `dictionary` to `dict`. * UnEdit Forgot we can't use backticks in a blurb, so needed to remove them. * Clean up * Uncomment stub Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2022-11-24 08:30:37 +01:00
"""
pass