From 2a6029c1ba0000bf087e279c05be79dd8e90cf7e Mon Sep 17 00:00:00 2001 From: ketigid Date: Sun, 30 Apr 2023 12:28:41 +0800 Subject: [PATCH 1/2] Fixes typos --- exercises/concept/tisbury-treasure-hunt/tuples.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/concept/tisbury-treasure-hunt/tuples.py b/exercises/concept/tisbury-treasure-hunt/tuples.py index 92336d88ec..05a0d8c3a6 100644 --- a/exercises/concept/tisbury-treasure-hunt/tuples.py +++ b/exercises/concept/tisbury-treasure-hunt/tuples.py @@ -14,7 +14,7 @@ def get_coordinate(record): def convert_coordinate(coordinate): """Split the given coordinate into tuple containing its individual components. - :param coordinate: str - a string map coordinate + :param coordinate: str - a string map coordinate. :return: tuple - the string coordinate split into its individual components. """ @@ -49,7 +49,7 @@ def clean_up(combined_record_group): :param combined_record_group: tuple - everything from both participants. :return: str - everything "cleaned", excess coordinates and information are removed. - The return statement should be a multi-lined string with items separated by newlines. + The return statement should be a multi-line string with items separated by newlines. (see HINTS.md for an example). """ From b2c6482b4c07ab4b2e0a30a814f91cc77d702876 Mon Sep 17 00:00:00 2001 From: ketigid Date: Sun, 30 Apr 2023 12:34:03 +0800 Subject: [PATCH 2/2] Fixes typos --- .../tisbury-treasure-hunt/.docs/introduction.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/exercises/concept/tisbury-treasure-hunt/.docs/introduction.md b/exercises/concept/tisbury-treasure-hunt/.docs/introduction.md index fa0776752b..6060fb51aa 100644 --- a/exercises/concept/tisbury-treasure-hunt/.docs/introduction.md +++ b/exercises/concept/tisbury-treasure-hunt/.docs/introduction.md @@ -38,7 +38,7 @@ Single iterables have their elements added one by one: ("Parrot", "Bird", 334782) >>> multiple_elements_set = tuple({2, 3, 5, 7, 11}) -(2,3,5,7,11) +(2, 3, 5, 7, 11) ``` #### Declaring a tuple as a _literal_ : @@ -58,9 +58,9 @@ Nested data structures can be included as `tuple` elements, including other `tup ```python >>> nested_data_structures = ({"fish": "gold", "monkey": "brown", "parrot" : "grey"}, ("fish", "mammal", "bird")) -({"fish": "gold", "monkey": "brown", "parrot" : "grey"}, ("fish", "mammal", "bird")) +({"fish": "gold", "monkey": "brown", "parrot": "grey"}, ("fish", "mammal", "bird")) ->>> nested_data_structures_1 : (["fish", "gold", "monkey", "brown", "parrot", "grey"], ("fish", "mammal", "bird")) +>>> nested_data_structures_1 = (["fish", "gold", "monkey", "brown", "parrot", "grey"], ("fish", "mammal", "bird")) (["fish", "gold", "monkey", "brown", "parrot", "grey"], ("fish", "mammal", "bird")) ``` @@ -72,7 +72,7 @@ Tuples can be concatenated using plus `+` operator, which unpacks each `tuple` c >>> new_via_concatenate = ("George", 5) + ("cat", "Tabby") ("George", 5, "cat", "Tabby") -#likewise, using the multiplication operator * is the equivalent of using + n times +# Likewise, using the multiplication operator * is the equivalent of using + n times >>> first_group = ("cat", "dog", "elephant") >>> multiplied_group = first_group * 3 @@ -86,14 +86,14 @@ Elements within a `tuple` can be accessed via _bracket notation_ using a `0-base ```python student_info = ("Alyssa", "grade 3", "female", 8 ) -#gender is at index 2 or index -2 +# Gender is at index 2 or index -2 >>> student_gender = student_info[2] 'female' >>> student_gender = student_info[-2] 'female' -#name is at index 0 or index -4 +# Name is at index 0 or index -4 >>> student_name = student_info[0] Alyssa @@ -118,7 +118,7 @@ female 8 >>> for index, item in enumerate(student_info): -... print("Index is: " + str(index) + ", value is: " + str(item) +".") +... print("Index is: " + str(index) + ", value is: " + str(item) + ".") ... Index is: 0, value is: Alyssa. @@ -141,4 +141,4 @@ True [common sequence operations]: https://docs.python.org/3/library/stdtypes.html#common-sequence-operations [tuple]: https://docs.python.org/3/library/stdtypes.html#tuple -[mutable sequence operations]: https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types \ No newline at end of file +[mutable sequence operations]: https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types