From ff16cb9c0ab05933dbe384275e71290b79b4d052 Mon Sep 17 00:00:00 2001 From: Vy San Date: Thu, 16 Apr 2026 12:27:58 -0400 Subject: [PATCH 1/6] Add new test cases --- string_2/adjacent-vowels/starter.py | 1 - string_2/camel-to-snake/io.json | 4 ++++ string_2/censor-word/io.json | 12 ++++++++++ string_2/contains-code-like/io.json | 12 ++++++++++ string_2/count-pairs/io.json | 20 ++++++++++++++++ string_2/count-repeat/io.json | 14 ++++++++--- string_2/count-repeat/meta.json | 2 +- string_2/count-repeat/starter.py | 2 +- string_2/count-vowels/io.json | 24 +++++++++++++++++++ string_2/double-every-nth-char/description.md | 7 +++--- string_2/double-every-nth-char/io.json | 8 +++++++ string_2/double-letter/io.json | 20 ++++++++++++++++ string_2/every-other-repeated/io.json | 20 ++++++++++++++++ string_2/first-unique-character/io.json | 8 +++++++ string_2/middle-characters/io.json | 20 ++++++++++++++++ string_2/modulo-3/description.md | 4 ++-- string_2/modulo-3/io.json | 8 +++++++ string_2/pig-latin/io.json | 12 ++++++++++ string_2/range-chars/io.json | 16 +++++++++++++ string_2/remove-vowels-once/io.json | 20 ++++++++++++++++ string_2/remove-vowels/io.json | 20 ++++++++++++++++ string_2/reverse-string/io.json | 20 ++++++++++++++++ string_2/same-adjacent/io.json | 20 ++++++++++++++++ 23 files changed, 282 insertions(+), 12 deletions(-) diff --git a/string_2/adjacent-vowels/starter.py b/string_2/adjacent-vowels/starter.py index 8534aef3..9329d681 100644 --- a/string_2/adjacent-vowels/starter.py +++ b/string_2/adjacent-vowels/starter.py @@ -1,2 +1 @@ def adjacent_vowels(word: str) -> int: - return diff --git a/string_2/camel-to-snake/io.json b/string_2/camel-to-snake/io.json index 9a71307b..3058b0c1 100644 --- a/string_2/camel-to-snake/io.json +++ b/string_2/camel-to-snake/io.json @@ -34,5 +34,9 @@ { "input": ["noChangeNeeded"], "output": "no_change_needed" + }, + { + "input": ["XMLHttpRequestJSONParser"], + "output": "x_m_l_http_request_j_s_o_n_parser" } ] \ No newline at end of file diff --git a/string_2/censor-word/io.json b/string_2/censor-word/io.json index 364a1c82..4b60cb4b 100644 --- a/string_2/censor-word/io.json +++ b/string_2/censor-word/io.json @@ -26,5 +26,17 @@ { "input": ["", "word"], "output": "" + }, + { + "input": ["bad,bad! bad?", "bad"], + "output": "***,***! ***?" + }, + { + "input": ["test test", "test"], + "output": "**** ****" + }, + { + "input": ["test", ""], + "output": "test" } ] \ No newline at end of file diff --git a/string_2/contains-code-like/io.json b/string_2/contains-code-like/io.json index 784b90ee..0305c552 100644 --- a/string_2/contains-code-like/io.json +++ b/string_2/contains-code-like/io.json @@ -26,5 +26,17 @@ { "input": ["cooe and cope and cole"], "output": true + }, + { + "input": ["coze is here"], + "output": true + }, + { + "input": ["acope and coze and code"], + "output": true + }, + { + "input": ["coxa coke coo"], + "output": true } ] diff --git a/string_2/count-pairs/io.json b/string_2/count-pairs/io.json index 08d260bf..21c32976 100644 --- a/string_2/count-pairs/io.json +++ b/string_2/count-pairs/io.json @@ -18,5 +18,25 @@ { "input": ["xxxxxxx", "x", "z"], "output": 0 + }, + { + "input": ["abcdef", "a", "f"], + "output": 0 + }, + { + "input": ["ababa", "a", "b"], + "output": 4 + }, + { + "input": ["baab", "a", "b"], + "output": 2 + }, + { + "input": ["aaaa", "a", "a"], + "output": 0 + }, + { + "input": ["xyabz", "a", "b"], + "output": 1 } ] diff --git a/string_2/count-repeat/io.json b/string_2/count-repeat/io.json index 9803d854..33e904b8 100644 --- a/string_2/count-repeat/io.json +++ b/string_2/count-repeat/io.json @@ -16,11 +16,19 @@ "output": 0 }, { - "input": ["hello", "l"], + "input": ["aaaaaaa", "a"], "output": 1 }, { - "input": ["RAHHahh", "h"], - "output": 1 + "input": ["AAaAAaaA", "a"], + "output": 1 + }, + { + "input": ["xxxyxxxxzxx", "x"], + "output": 3 + }, + { + "input": ["bbbabbbbabbb", "b"], + "output": 3 } ] diff --git a/string_2/count-repeat/meta.json b/string_2/count-repeat/meta.json index 3e112942..63fcd7f9 100644 --- a/string_2/count-repeat/meta.json +++ b/string_2/count-repeat/meta.json @@ -1,6 +1,6 @@ { "title": "Count Repeat", - "name": "countRepeat", + "name": "count_repeat", "difficulty": "medium", "author": "Jutulli", "category": "String-2", diff --git a/string_2/count-repeat/starter.py b/string_2/count-repeat/starter.py index bbe05c63..f27207a5 100644 --- a/string_2/count-repeat/starter.py +++ b/string_2/count-repeat/starter.py @@ -1,2 +1,2 @@ -def countRepeat(a: str, b: str) -> bool: +def count_repeat(a: str, b: str) -> bool: diff --git a/string_2/count-vowels/io.json b/string_2/count-vowels/io.json index 4be6090b..f7a27cb0 100644 --- a/string_2/count-vowels/io.json +++ b/string_2/count-vowels/io.json @@ -30,5 +30,29 @@ { "input": ["Don't bother with capital letters"], "output": 9 + }, + { + "input": ["hmm"], + "output": 0 + }, + { + "input": ["beautiful sky"], + "output": 6 + }, + { + "input": ["AEiouYaeIOuy"], + "output": 12 + }, + { + "input": ["C0d1ng 1s Aw3s0m3!!! yeS"], + "output": 3 + }, + { + "input": ["queueing queues quietly"], + "output": 13 + }, + { + "input": ["syzygy rhythm crypt"], + "output": 5 } ] diff --git a/string_2/double-every-nth-char/description.md b/string_2/double-every-nth-char/description.md index bcf0c7a1..c43368cb 100644 --- a/string_2/double-every-nth-char/description.md +++ b/string_2/double-every-nth-char/description.md @@ -1,7 +1,6 @@ Given a string and a positive integer n, return a modified string where every character at position n and its multiples is doubled. Count positions starting from 1. For example: -double_nth(“hello", 2) → 'heelllo' (doubles chars at positions 2,4) -double_nth('python', 3) → 'pytthonn' (doubles char at position 3,6) -double_nth('code', 1) → 'ccooddee' (doubles every char) - +- double_nth(“hello", 2) → 'heelllo' (doubles chars at positions 2,4) +- double_nth('python', 3) → 'pytthonn' (doubles char at position 3,6) +- double_nth('code', 1) → 'ccooddee' (doubles every char) \ No newline at end of file diff --git a/string_2/double-every-nth-char/io.json b/string_2/double-every-nth-char/io.json index 9cb8c48d..a29f99b0 100644 --- a/string_2/double-every-nth-char/io.json +++ b/string_2/double-every-nth-char/io.json @@ -30,6 +30,14 @@ { "input": ["java", 3], "output": "javva" + }, + { + "input": ["xyz", 1], + "output": "xxyyzz" + }, + { + "input": ["abcdef", 5], + "output": "abcdeef" } ] diff --git a/string_2/double-letter/io.json b/string_2/double-letter/io.json index 9dc643ec..9c8124ca 100644 --- a/string_2/double-letter/io.json +++ b/string_2/double-letter/io.json @@ -18,5 +18,25 @@ { "input": ["bo"], "output": "bo" + }, + { + "input": ["aio"], + "output": "aio" + }, + { + "input": ["aeiobcd"], + "output": "aeiobccd" + }, + { + "input": ["a e dog"], + "output": "a e dogg" + }, + { + "input": ["BaNaNa"], + "output": "BaNNaNa" + }, + { + "input": ["hi there!"], + "output": "hi tthere!" } ] \ No newline at end of file diff --git a/string_2/every-other-repeated/io.json b/string_2/every-other-repeated/io.json index ae85e033..4080dc19 100644 --- a/string_2/every-other-repeated/io.json +++ b/string_2/every-other-repeated/io.json @@ -18,5 +18,25 @@ { "input": ["loool", "hello"], "output": 1 + }, + { + "input": ["ab", "cab"], + "output": 0 + }, + { + "input": ["", "zzax"], + "output": 0 + }, + { + "input": ["AcxLapX", "zzax"], + "output": 2 + }, + { + "input": ["aaaaa", "xxaa"], + "output": 3 + }, + { + "input": ["a a a a", "xa "], + "output": 0 } ] diff --git a/string_2/first-unique-character/io.json b/string_2/first-unique-character/io.json index 7f111bc3..1453f828 100644 --- a/string_2/first-unique-character/io.json +++ b/string_2/first-unique-character/io.json @@ -30,5 +30,13 @@ { "input": [""], "output": "" + }, + { + "input": ["aabbccd"], + "output": "d" + }, + { + "input": ["aAbBABac"], + "output": "c" } ] \ No newline at end of file diff --git a/string_2/middle-characters/io.json b/string_2/middle-characters/io.json index aac2c712..1c69a542 100644 --- a/string_2/middle-characters/io.json +++ b/string_2/middle-characters/io.json @@ -18,5 +18,25 @@ { "input": ["EricMayhewistTHEbest"], "output": 3 + }, + { + "input": ["a"], + "output": 0 + }, + { + "input": ["aa"], + "output": 0 + }, + { + "input": ["#a#a#a#"], + "output": 2 + }, + { + "input": ["hello!h!e!hh"], + "output": 2 + }, + { + "input": ["abc defg"], + "output": 0 } ] diff --git a/string_2/modulo-3/description.md b/string_2/modulo-3/description.md index 7fba1fa5..4078626a 100644 --- a/string_2/modulo-3/description.md +++ b/string_2/modulo-3/description.md @@ -1,7 +1,7 @@ -Write a function modulo_3(str:str) -> str, that given a string, return this string with mismatched characters, this should be done working modulo-3, first take a character from the left hand side and by jumps of three you should create a new word. +Write a function modulo_3(str:str) -> str, that given a string, return this string with mismatched characters, this should be done using a modulo 3 pattern, first take a character from the left hand side and by jumps of three you should create a new word. For example: - `modulo_3("Hello")` → `"Hleol"` - `modulo_3("Description")` → `"Dcpoertnsii"` -- `modulo_3("Cat")` → `"Cat"` +- `modulo_3("Cat")` → `"Cat"` \ No newline at end of file diff --git a/string_2/modulo-3/io.json b/string_2/modulo-3/io.json index 9503ea24..63d44abd 100644 --- a/string_2/modulo-3/io.json +++ b/string_2/modulo-3/io.json @@ -33,6 +33,14 @@ { "input": [""], "output": "" + }, + { + "input": ["AbCdEfGh"], + "output": "AdGbEhCf" + }, + { + "input": ["a b!c d?e"], + "output": "a!d c?b e" } ] diff --git a/string_2/pig-latin/io.json b/string_2/pig-latin/io.json index b6394aa8..dd590db0 100644 --- a/string_2/pig-latin/io.json +++ b/string_2/pig-latin/io.json @@ -26,5 +26,17 @@ { "input": [""], "output": "" + }, + { + "input": ["APPLE"], + "output": "Appleway" + }, + { + "input": ["yellow"], + "output": "ellowyay" + }, + { + "input": ["hello!"], + "output": "ello!hay" } ] \ No newline at end of file diff --git a/string_2/range-chars/io.json b/string_2/range-chars/io.json index cc57159d..c389abcf 100644 --- a/string_2/range-chars/io.json +++ b/string_2/range-chars/io.json @@ -22,5 +22,21 @@ { "input": ["123", "435"], "output": "3" + }, + { + "input": ["AbcD", "abcd"], + "output": "bc" + }, + { + "input": ["!@#$", "@!#$"], + "output": "!@#$" + }, + { + "input": ["aa aa", "aaaaa"], + "output": "aaaa" + }, + { + "input": ["112233", "221133"], + "output": "1233" } ] diff --git a/string_2/remove-vowels-once/io.json b/string_2/remove-vowels-once/io.json index 5534af52..1272e57b 100644 --- a/string_2/remove-vowels-once/io.json +++ b/string_2/remove-vowels-once/io.json @@ -18,5 +18,25 @@ { "input": ["Symbol"], "output": "Smbl" + }, + { + "input": ["aeiouy"], + "output": "" + }, + { + "input": ["Education"], + "output": "dctn" + }, + { + "input": ["rhythms"], + "output": "rhthms" + }, + { + "input": [""], + "output": "" + }, + { + "input": ["a x a"], + "output": " x a" } ] diff --git a/string_2/remove-vowels/io.json b/string_2/remove-vowels/io.json index b25f4323..c34c2588 100644 --- a/string_2/remove-vowels/io.json +++ b/string_2/remove-vowels/io.json @@ -18,5 +18,25 @@ { "input": ["hello world!"], "output": "hll wrld!" + }, + { + "input": ["AEIOUaeiou"], + "output": "" + }, + { + "input": ["rhythms"], + "output": "rhythms" + }, + { + "input": ["h3ll0 w0rld!"], + "output": "h3ll0 w0rld!" + }, + { + "input": [""], + "output": "" + }, + { + "input": ["nice one"], + "output": "nc n" } ] diff --git a/string_2/reverse-string/io.json b/string_2/reverse-string/io.json index 5bc35da9..944711a5 100644 --- a/string_2/reverse-string/io.json +++ b/string_2/reverse-string/io.json @@ -18,5 +18,25 @@ { "input": ["001000111010"], "output": "010111000100" + }, + { + "input": ["a"], + "output": "a" + }, + { + "input": ["hello!"], + "output": "!olleh" + }, + { + "input": ["a1b2c3d4"], + "output": "4d3c2b1a" + }, + { + "input": ["a b c d"], + "output": "d c b a" + }, + { + "input": ["Love"], + "output": "evoL" } ] diff --git a/string_2/same-adjacent/io.json b/string_2/same-adjacent/io.json index 0dc2c8aa..f957e978 100644 --- a/string_2/same-adjacent/io.json +++ b/string_2/same-adjacent/io.json @@ -18,5 +18,25 @@ { "input": ["ababababa", "b"], "output": 0 + }, + { + "input": ["", "c"], + "output": 0 + }, + { + "input": ["cc", ""], + "output": 0 + }, + { + "input": ["cc", "c"], + "output": 2 + }, + { + "input": ["xxxxxxx", "x"], + "output": 7 + }, + { + "input": ["!!@@!!", "!"], + "output": 4 } ] From 2872b69c7ed72b5ef207da40a8d5f86aa1969f96 Mon Sep 17 00:00:00 2001 From: Vy San Date: Thu, 16 Apr 2026 12:38:38 -0400 Subject: [PATCH 2/6] delete adjacent vowels --- string_2/adjacent-vowels/description.md | 8 ----- string_2/adjacent-vowels/io.json | 43 ------------------------- string_2/adjacent-vowels/meta.json | 10 ------ string_2/adjacent-vowels/starter.py | 1 - 4 files changed, 62 deletions(-) delete mode 100644 string_2/adjacent-vowels/description.md delete mode 100644 string_2/adjacent-vowels/io.json delete mode 100644 string_2/adjacent-vowels/meta.json delete mode 100644 string_2/adjacent-vowels/starter.py diff --git a/string_2/adjacent-vowels/description.md b/string_2/adjacent-vowels/description.md deleted file mode 100644 index 0d568faa..00000000 --- a/string_2/adjacent-vowels/description.md +++ /dev/null @@ -1,8 +0,0 @@ -Write a function that takes as input a `string` and returns the numbers times two `consecutive` vowels appear back-to-back. Count each pair of *adjacent* vowels. We define vowels as any letter a, e, i, o or u case insensitively. - - -For example: -- `adjacent_vowels("heahea")` → `2` (`"ea"` and `"ea"`) -- `adjacent_vowels("LeAeA")` → `3` (`"ea"`, `"Ae"` and `"eA"`) -- `adjacent_vowels("EricMayhew")` → `0` (No adjacent vowels) - diff --git a/string_2/adjacent-vowels/io.json b/string_2/adjacent-vowels/io.json deleted file mode 100644 index 69f3b69d..00000000 --- a/string_2/adjacent-vowels/io.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "input": ["testest"], - "output": 0 - }, - { - "input": ["AaAaEeAa"], - "output": 7 - }, - { - "input": ["u u uu u u"], - "output": 1 - }, - { - "input": ["TikiTakaa"], - "output": 1 - }, - { - "input": ["AhAhB00ooOO#"], - "output": 3 - }, - { - "input": ["DC..Moooooon"], - "output": 5 - }, - { - "input": [""], - "output": 0 - }, - { - "input": ["aabbeeiioouu"], - "output": 8 - }, - { - "input": ["12345"], - "output": 0 - }, - { - "input": ["aeea"], - "output": 3 - } -] - diff --git a/string_2/adjacent-vowels/meta.json b/string_2/adjacent-vowels/meta.json deleted file mode 100644 index baf92265..00000000 --- a/string_2/adjacent-vowels/meta.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "title": "Adjacent Vowels", - "name": "adjacent_vowels", - "difficulty": "easy", - "author": "Feodor G", - "category": "String-2", - "question_type": [ - "coding" - ] -} \ No newline at end of file diff --git a/string_2/adjacent-vowels/starter.py b/string_2/adjacent-vowels/starter.py deleted file mode 100644 index 9329d681..00000000 --- a/string_2/adjacent-vowels/starter.py +++ /dev/null @@ -1 +0,0 @@ -def adjacent_vowels(word: str) -> int: From 54cea1611f298f3acd9082918e7c9fcad87092b9 Mon Sep 17 00:00:00 2001 From: Vy San Date: Thu, 16 Apr 2026 12:41:56 -0400 Subject: [PATCH 3/6] Add pass --- string_2/camel-to-snake/starter.py | 4 +++- string_2/censor-word/starter.py | 4 +++- string_2/contains-code-like/starter.py | 2 ++ string_2/count-pairs/starter.py | 2 ++ string_2/count-repeat/starter.py | 3 ++- string_2/count-vowels/starter.py | 3 ++- string_2/double-every-nth-char/starter.py | 2 ++ string_2/double-letter/starter.py | 2 ++ string_2/every-other-repeated/starter.py | 2 ++ string_2/first-unique-character/starter.py | 4 +++- string_2/middle-characters/starter.py | 3 ++- string_2/modulo-3/starter.py | 2 ++ string_2/pig-latin/starter.py | 4 +++- string_2/range-chars/starter.py | 2 ++ string_2/remove-vowels-once/starter.py | 2 ++ string_2/remove-vowels/starter.py | 3 ++- string_2/reverse-string/starter.py | 2 ++ string_2/same-adjacent/starter.py | 2 ++ string_2/sandwich-word/starter.py | 4 +++- string_2/string-explosion/starter.py | 4 +++- 20 files changed, 46 insertions(+), 10 deletions(-) diff --git a/string_2/camel-to-snake/starter.py b/string_2/camel-to-snake/starter.py index 10480f4c..7a5c2f8a 100644 --- a/string_2/camel-to-snake/starter.py +++ b/string_2/camel-to-snake/starter.py @@ -1 +1,3 @@ -def camel_to_snake(s: str) -> str: \ No newline at end of file +def camel_to_snake(s: str) -> str: + # Your code here + pass \ No newline at end of file diff --git a/string_2/censor-word/starter.py b/string_2/censor-word/starter.py index 46f7dfab..73773f86 100644 --- a/string_2/censor-word/starter.py +++ b/string_2/censor-word/starter.py @@ -1 +1,3 @@ -def censor_word(s: str, word: str) -> str: \ No newline at end of file +def censor_word(s: str, word: str) -> str: + # Your code here + pass \ No newline at end of file diff --git a/string_2/contains-code-like/starter.py b/string_2/contains-code-like/starter.py index 1f80e5b2..de26a7dc 100644 --- a/string_2/contains-code-like/starter.py +++ b/string_2/contains-code-like/starter.py @@ -1 +1,3 @@ def contains_code_like(s): + # Your code here + pass diff --git a/string_2/count-pairs/starter.py b/string_2/count-pairs/starter.py index 43ca99ff..75cbe098 100644 --- a/string_2/count-pairs/starter.py +++ b/string_2/count-pairs/starter.py @@ -1 +1,3 @@ def count_pairs(string, a, b): + # Your code here + pass diff --git a/string_2/count-repeat/starter.py b/string_2/count-repeat/starter.py index f27207a5..6982f8d4 100644 --- a/string_2/count-repeat/starter.py +++ b/string_2/count-repeat/starter.py @@ -1,2 +1,3 @@ def count_repeat(a: str, b: str) -> bool: - +# Your code here + pass diff --git a/string_2/count-vowels/starter.py b/string_2/count-vowels/starter.py index ecbb6e13..e11d81a8 100644 --- a/string_2/count-vowels/starter.py +++ b/string_2/count-vowels/starter.py @@ -1,2 +1,3 @@ def count_vowels(string): - + # Your code here + pass diff --git a/string_2/double-every-nth-char/starter.py b/string_2/double-every-nth-char/starter.py index 1512e8f2..471187b3 100644 --- a/string_2/double-every-nth-char/starter.py +++ b/string_2/double-every-nth-char/starter.py @@ -1 +1,3 @@ def double_nth_char(text: str, n: int) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/double-letter/starter.py b/string_2/double-letter/starter.py index ac1828a2..2ce674e8 100644 --- a/string_2/double-letter/starter.py +++ b/string_2/double-letter/starter.py @@ -1 +1,3 @@ def double_letter(word): +# Your code here + pass \ No newline at end of file diff --git a/string_2/every-other-repeated/starter.py b/string_2/every-other-repeated/starter.py index 356011ea..0733ea7e 100644 --- a/string_2/every-other-repeated/starter.py +++ b/string_2/every-other-repeated/starter.py @@ -1 +1,3 @@ def every_other_repeated(a, b): +# Your code here + pass \ No newline at end of file diff --git a/string_2/first-unique-character/starter.py b/string_2/first-unique-character/starter.py index 13014b19..40961cbc 100644 --- a/string_2/first-unique-character/starter.py +++ b/string_2/first-unique-character/starter.py @@ -1 +1,3 @@ -def first_unique_char(s: str) -> str: \ No newline at end of file +def first_unique_char(s: str) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/middle-characters/starter.py b/string_2/middle-characters/starter.py index 154773a0..914b78eb 100644 --- a/string_2/middle-characters/starter.py +++ b/string_2/middle-characters/starter.py @@ -1,2 +1,3 @@ def middle_characters(word: str) -> int: - +# Your code here + pass diff --git a/string_2/modulo-3/starter.py b/string_2/modulo-3/starter.py index 9f4590ca..c4431d1d 100644 --- a/string_2/modulo-3/starter.py +++ b/string_2/modulo-3/starter.py @@ -1 +1,3 @@ def modulo_3(str:str) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/pig-latin/starter.py b/string_2/pig-latin/starter.py index 9fd45b34..959c6df4 100644 --- a/string_2/pig-latin/starter.py +++ b/string_2/pig-latin/starter.py @@ -1 +1,3 @@ -def pig_latin(s: str) -> str: \ No newline at end of file +def pig_latin(s: str) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/range-chars/starter.py b/string_2/range-chars/starter.py index 872b9ffb..acc4306d 100644 --- a/string_2/range-chars/starter.py +++ b/string_2/range-chars/starter.py @@ -1 +1,3 @@ def range_chars(a: str, b: str) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/remove-vowels-once/starter.py b/string_2/remove-vowels-once/starter.py index ab52e03a..837f6dd3 100644 --- a/string_2/remove-vowels-once/starter.py +++ b/string_2/remove-vowels-once/starter.py @@ -1 +1,3 @@ def remove_vowels_once(word: str) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/remove-vowels/starter.py b/string_2/remove-vowels/starter.py index 23373e56..291fd399 100644 --- a/string_2/remove-vowels/starter.py +++ b/string_2/remove-vowels/starter.py @@ -1,2 +1,3 @@ def remove_vowels(strng: str) -> str: - +# Your code here + pass diff --git a/string_2/reverse-string/starter.py b/string_2/reverse-string/starter.py index 2cd8569e..be6da980 100644 --- a/string_2/reverse-string/starter.py +++ b/string_2/reverse-string/starter.py @@ -1 +1,3 @@ def reverse_string(string): +# Your code here + pass \ No newline at end of file diff --git a/string_2/same-adjacent/starter.py b/string_2/same-adjacent/starter.py index 4d45c3ff..f3129d8c 100644 --- a/string_2/same-adjacent/starter.py +++ b/string_2/same-adjacent/starter.py @@ -1 +1,3 @@ def same_adjacent(str, char): +# Your code here + pass \ No newline at end of file diff --git a/string_2/sandwich-word/starter.py b/string_2/sandwich-word/starter.py index 5ba9f89f..e02991cd 100644 --- a/string_2/sandwich-word/starter.py +++ b/string_2/sandwich-word/starter.py @@ -1 +1,3 @@ -def sandwich_word(s: str) -> str: \ No newline at end of file +def sandwich_word(s: str) -> str: +# Your code here + pass \ No newline at end of file diff --git a/string_2/string-explosion/starter.py b/string_2/string-explosion/starter.py index 0f7950fc..afbd7063 100644 --- a/string_2/string-explosion/starter.py +++ b/string_2/string-explosion/starter.py @@ -1 +1,3 @@ -def string_explosion(s: str) -> str: \ No newline at end of file +def string_explosion(s: str) -> str: +# Your code here + pass \ No newline at end of file From 0f241b7dd8d25d9e956317b0d00ed2e5669823fd Mon Sep 17 00:00:00 2001 From: Vy San Date: Thu, 16 Apr 2026 13:12:07 -0400 Subject: [PATCH 4/6] Change description --- string_2/camel-to-snake/description.md | 2 +- string_2/contains-code-like/description.md | 2 +- string_2/count-pairs/description.md | 3 +-- string_2/count-repeat/description.md | 2 +- string_2/count-repeat/starter.py | 2 +- string_2/count-vowels/starter.py | 2 +- string_2/double-every-nth-char/description.md | 2 +- string_2/double-letter/description.md | 2 +- string_2/middle-characters/description.md | 2 +- string_2/modulo-3/description.md | 3 +-- string_2/range-chars/description.md | 2 +- string_2/remove-vowels-once/description.md | 2 +- string_2/remove-vowels/description.md | 2 +- string_2/reverse-string/description.md | 3 +-- string_2/same-adjacent/description.md | 1 - 15 files changed, 14 insertions(+), 18 deletions(-) diff --git a/string_2/camel-to-snake/description.md b/string_2/camel-to-snake/description.md index 9bd3ef0d..53eda854 100644 --- a/string_2/camel-to-snake/description.md +++ b/string_2/camel-to-snake/description.md @@ -1,6 +1,6 @@ Write a function `camel_to_snake(s: str) -> str` that converts a camelCase string into a snake_case string. -In camelCase, each word after the first starts with an uppercase letter (e.g., "thisIsFun"). In snake_case, words are all lowercase and separated by underscores (e.g., "this_is_fun"). +In camelCase, each word after the first starts with an uppercase letter ("thisIsFun"). In snake_case, words are all lowercase and separated by underscores ("this_is_fun"). For example: - `camel_to_snake("thisIsFun")` → `"this_is_fun"` diff --git a/string_2/contains-code-like/description.md b/string_2/contains-code-like/description.md index afa0c888..62ab8194 100644 --- a/string_2/contains-code-like/description.md +++ b/string_2/contains-code-like/description.md @@ -2,7 +2,7 @@ Write a function `contains_code_like(s)` that takes a string `s` and returns `Tr For example: - `contains_code_like("I love to decode")` should return `True` because it contains "code". -- `contains_code_like("coding and cobe")` should return `True` because it contains "cobe" (which fits the pattern). +- `contains_code_like("coding and cobe")` should return `True` because it contains "cobe". - `contains_code_like("cofe is life")` should return `True` because it contains "cofe". - `contains_code_like("cone")` should return `False` because it does not contain a substring that fits the pattern. diff --git a/string_2/count-pairs/description.md b/string_2/count-pairs/description.md index 190f2ea9..7677554d 100644 --- a/string_2/count-pairs/description.md +++ b/string_2/count-pairs/description.md @@ -1,5 +1,4 @@ - -Make a function that takes in a string and two characters, and returns how many times the two characters appear next to each other in the string, either directly before or in front of each other. If the string does not contain one of the characters or if both characters are the same, return 0. +Write a function `count_pairs(string, a, b)` that takes in a string and two characters, and returns how many times the two characters appear next to each other in the string, either directly before or in front of each other. If the string does not contain one of the characters or if both characters are the same, return 0. Note that pairs should not be double counted. For instance, if we wanted to count how many times "p" appears next to "a" in the word painting, we would only count it once as "pa" and not twice as "pa" and "ap". diff --git a/string_2/count-repeat/description.md b/string_2/count-repeat/description.md index ecbdaa06..a955846e 100644 --- a/string_2/count-repeat/description.md +++ b/string_2/count-repeat/description.md @@ -1,4 +1,4 @@ -Given 2 strings `a` and `b`, return the total amount of sequences where `b` is repeated in a row. Note: the string `a` can be of any length and `b` will always be one character. +Write a function `count_repeat(a: str, b: str)` given 2 strings `a` and `b`, return the total amount of sequences where `b` is repeated in a row. Note: the string `a` can be of any length and `b` will always be one character. For example: - `count_repetition("byzzx", "z") → 1` diff --git a/string_2/count-repeat/starter.py b/string_2/count-repeat/starter.py index 6982f8d4..4e206b4e 100644 --- a/string_2/count-repeat/starter.py +++ b/string_2/count-repeat/starter.py @@ -1,3 +1,3 @@ -def count_repeat(a: str, b: str) -> bool: +def count_repeat(a: str, b: str): # Your code here pass diff --git a/string_2/count-vowels/starter.py b/string_2/count-vowels/starter.py index e11d81a8..b25d072f 100644 --- a/string_2/count-vowels/starter.py +++ b/string_2/count-vowels/starter.py @@ -1,3 +1,3 @@ -def count_vowels(string): +def count_vowels(s): # Your code here pass diff --git a/string_2/double-every-nth-char/description.md b/string_2/double-every-nth-char/description.md index c43368cb..321ead04 100644 --- a/string_2/double-every-nth-char/description.md +++ b/string_2/double-every-nth-char/description.md @@ -1,4 +1,4 @@ -Given a string and a positive integer n, return a modified string where every character at position n and its multiples is doubled. Count positions starting from 1. +Write a function `double_nth_char(text: str, n: int) -> str` given a string and a positive integer n, return a modified string where every character at position n and its multiples is doubled. Count positions starting from 1. For example: - double_nth(“hello", 2) → 'heelllo' (doubles chars at positions 2,4) diff --git a/string_2/double-letter/description.md b/string_2/double-letter/description.md index a5c3767a..ac8683a8 100644 --- a/string_2/double-letter/description.md +++ b/string_2/double-letter/description.md @@ -1,5 +1,5 @@ Oh no! The letter pixie took consonants from these words! -Given a string, double the second consonant in the string to form the actual word. +Write a function `double_letter(word)` given a string, double the second consonant in the string to form the actual word. For example: diff --git a/string_2/middle-characters/description.md b/string_2/middle-characters/description.md index 35e54aa2..e2b87137 100644 --- a/string_2/middle-characters/description.md +++ b/string_2/middle-characters/description.md @@ -1,4 +1,4 @@ -Given a string, return the number of times the first character is repeated excluding at the first and lastindex. Keep in mind that upper-case and lower-case letters are counted as the same. +Write a function `middle_characters(word: str) -> int` given a string, return the number of times the first character is repeated excluding at the first and lastindex. Keep in mind that upper-case and lower-case letters are counted as the same. For example: - `middle_characters("abanAnab")` → `3` diff --git a/string_2/modulo-3/description.md b/string_2/modulo-3/description.md index 4078626a..146b4b2b 100644 --- a/string_2/modulo-3/description.md +++ b/string_2/modulo-3/description.md @@ -1,5 +1,4 @@ - -Write a function modulo_3(str:str) -> str, that given a string, return this string with mismatched characters, this should be done using a modulo 3 pattern, first take a character from the left hand side and by jumps of three you should create a new word. +Write a function `modulo_3(str:str) -> str`, that given a string, return this string with mismatched characters, this should be done using a modulo 3 pattern, first take a character from the left hand side and by jumps of three you should create a new word. For example: - `modulo_3("Hello")` → `"Hleol"` diff --git a/string_2/range-chars/description.md b/string_2/range-chars/description.md index 11b314da..57fee3ba 100644 --- a/string_2/range-chars/description.md +++ b/string_2/range-chars/description.md @@ -1,4 +1,4 @@ -Create a new string which is made of characters of string A which are also present in string B at either the same spot, the spot before, or the spot after. Both strings A and B are the same size. +Write a function `range_chars(a: str, b: str) -> str` to create a new string which is made of characters of string A which are also present in string B at either the same spot, the spot before, or the spot after. Both strings A and B are the same size. For example: - `range_chars("flopped", "helping") -> "lpp"` diff --git a/string_2/remove-vowels-once/description.md b/string_2/remove-vowels-once/description.md index 89148580..cb176c4d 100644 --- a/string_2/remove-vowels-once/description.md +++ b/string_2/remove-vowels-once/description.md @@ -1,4 +1,4 @@ -Write a function that takes a string and returns a new string with all the vowels (a, e, i, o, u, y) removed. Only remove the vowels, the first time they are printed in the word. +Write a function `remove_vowels_once(word: str) -> str` that takes a string and returns a new string with all the vowels (a, e, i, o, u, y) removed. Only remove the vowels, the first time they are printed in the word. For example: - `remove_vowels_once("train")` → `"trn"` (The first "a" and "i" were removed) diff --git a/string_2/remove-vowels/description.md b/string_2/remove-vowels/description.md index 7e4bbfd2..9c0bb89a 100644 --- a/string_2/remove-vowels/description.md +++ b/string_2/remove-vowels/description.md @@ -1,4 +1,4 @@ -In a given string, make a function that returns said string but without any vowels. The string will always have at least one element and the inputted string will be lowercase. +In a given string, write a function `remove_vowels(strng: str) -> str` that returns said string but without any vowels. The string will always have at least one element and the inputted string will be lowercase. For example: - `remove_vowels(“pranjwal”) → prnjwl` diff --git a/string_2/reverse-string/description.md b/string_2/reverse-string/description.md index 71e3c0c4..e9c0aaf3 100644 --- a/string_2/reverse-string/description.md +++ b/string_2/reverse-string/description.md @@ -1,5 +1,4 @@ - -Write a funtion that, when given a random string, returns the reverse version of the string. +Write a function `reverse_string(string)` that, when given a random string, returns the reverse version of the string. For example: - `reverse_string("hello")` → `'olleh'` diff --git a/string_2/same-adjacent/description.md b/string_2/same-adjacent/description.md index be85d45e..97853170 100644 --- a/string_2/same-adjacent/description.md +++ b/string_2/same-adjacent/description.md @@ -1,4 +1,3 @@ - Write a function `same_adjacent(str, char)` that takes in a string and a single character. Return the number of times that the single character appears in the string, but only if it appears next to itself. For example: From 7a5c9abd2ebce24216531f0a0006719544ab259d Mon Sep 17 00:00:00 2001 From: Vy San Date: Thu, 16 Apr 2026 13:50:45 -0400 Subject: [PATCH 5/6] Fix test case --- string_2/count-repeat/io.json | 72 +++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/string_2/count-repeat/io.json b/string_2/count-repeat/io.json index 33e904b8..89bd0e22 100644 --- a/string_2/count-repeat/io.json +++ b/string_2/count-repeat/io.json @@ -1,34 +1,42 @@ [ - { - "input": ["xyzcvvzx", "b"], - "output": 0 - }, - { - "input": ["xyvxx", "x"], + { + "input": ["xyzcvvzx", "b"], + "output": 0 + }, + { + "input": ["xyvxx", "x"], + "output": 1 + }, + { + "input": ["xxxxvxxxxxxxvxvx", "x"], + "output": 2 + }, + { + "input": [" ", "x"], + "output": 0 + }, + { + "input": ["hello", "l"], + "output": 1 + }, + { + "input": ["RAHHahh", "h"], "output": 1 - }, - { - "input": ["xxxxvxxxxxxxvxvx", "x"], - "output": 2 - }, - { - "input": [" ", "x"], - "output": 0 - }, - { - "input": ["aaaaaaa", "a"], - "output": 1 - }, - { - "input": ["AAaAAaaA", "a"], - "output": 1 - }, - { - "input": ["xxxyxxxxzxx", "x"], - "output": 3 - }, - { - "input": ["bbbabbbbabbb", "b"], - "output": 3 - } - ] + }, + { + "input": ["aaaaaaa", "a"], + "output": 1 + }, + { + "input": ["AAaAAaaA", "a"], + "output": 1 + }, + { + "input": ["xxxyxxxxzxx", "x"], + "output": 3 + }, + { + "input": ["bbbabbbbabbb", "b"], + "output": 3 + } +] From 8ad6ae047b2176901c23289495fbe87a72b316ac Mon Sep 17 00:00:00 2001 From: Vy San Date: Thu, 16 Apr 2026 14:58:37 -0400 Subject: [PATCH 6/6] Make changes from review --- string_2/contains-code-like/description.md | 2 +- string_2/contains-code-like/starter.py | 2 +- string_2/count-pairs/description.md | 2 +- string_2/count-pairs/starter.py | 2 +- string_2/count-vowels/description.md | 2 +- string_2/count-vowels/starter.py | 4 ++-- string_2/double-every-nth-char/description.md | 2 +- string_2/double-letter/description.md | 2 +- string_2/double-letter/starter.py | 2 +- string_2/every-other-repeated/description.md | 2 +- string_2/every-other-repeated/starter.py | 2 +- string_2/middle-characters/description.md | 2 +- string_2/remove-vowels-once/description.md | 2 +- string_2/remove-vowels/description.md | 2 +- string_2/remove-vowels/starter.py | 2 +- string_2/reverse-string/description.md | 2 +- string_2/reverse-string/starter.py | 2 +- string_2/same-adjacent/description.md | 2 +- string_2/same-adjacent/starter.py | 4 ++-- 19 files changed, 21 insertions(+), 21 deletions(-) diff --git a/string_2/contains-code-like/description.md b/string_2/contains-code-like/description.md index 62ab8194..d3ed1d79 100644 --- a/string_2/contains-code-like/description.md +++ b/string_2/contains-code-like/description.md @@ -1,4 +1,4 @@ -Write a function `contains_code_like(s)` that takes a string `s` and returns `True` if the string contains the word "code" with any character in place of the third character. Specifically, the function should return `True` if anywhere in the string `s` there is a substring that matches the pattern "co?e", where `?` stands for any single character. +Write a function `contains_code_like(s: str) -> bool` that takes a string `s` and returns `True` if the string contains the word "code" with any character in place of the third character. Specifically, the function should return `True` if anywhere in the string `s` there is a substring that matches the pattern "co?e", where `?` stands for any single character. For example: - `contains_code_like("I love to decode")` should return `True` because it contains "code". diff --git a/string_2/contains-code-like/starter.py b/string_2/contains-code-like/starter.py index de26a7dc..274a0f89 100644 --- a/string_2/contains-code-like/starter.py +++ b/string_2/contains-code-like/starter.py @@ -1,3 +1,3 @@ -def contains_code_like(s): +def contains_code_like(s: str) -> bool: # Your code here pass diff --git a/string_2/count-pairs/description.md b/string_2/count-pairs/description.md index 7677554d..9e380876 100644 --- a/string_2/count-pairs/description.md +++ b/string_2/count-pairs/description.md @@ -1,4 +1,4 @@ -Write a function `count_pairs(string, a, b)` that takes in a string and two characters, and returns how many times the two characters appear next to each other in the string, either directly before or in front of each other. If the string does not contain one of the characters or if both characters are the same, return 0. +Write a function `count_pairs(string: str, a: str, b: str) -> int` that takes in a string and two characters, and returns how many times the two characters appear next to each other in the string, either directly before or in front of each other. If the string does not contain one of the characters or if both characters are the same, return 0. Note that pairs should not be double counted. For instance, if we wanted to count how many times "p" appears next to "a" in the word painting, we would only count it once as "pa" and not twice as "pa" and "ap". diff --git a/string_2/count-pairs/starter.py b/string_2/count-pairs/starter.py index 75cbe098..8af3cbcf 100644 --- a/string_2/count-pairs/starter.py +++ b/string_2/count-pairs/starter.py @@ -1,3 +1,3 @@ -def count_pairs(string, a, b): +def count_pairs(string: str, a: str, b: str) -> int: # Your code here pass diff --git a/string_2/count-vowels/description.md b/string_2/count-vowels/description.md index f1af8a5c..fb91ab2b 100644 --- a/string_2/count-vowels/description.md +++ b/string_2/count-vowels/description.md @@ -1,4 +1,4 @@ -Write a function `count_vowels(s)` that takes a string and returns the number of vowels (a, e, i, o, u, y) in it. +Write a function `count_vowels(s: str) -> int` that takes a string and returns the number of vowels (a, e, i, o, u, y) in it. For example: diff --git a/string_2/count-vowels/starter.py b/string_2/count-vowels/starter.py index b25d072f..5b505687 100644 --- a/string_2/count-vowels/starter.py +++ b/string_2/count-vowels/starter.py @@ -1,3 +1,3 @@ -def count_vowels(s): +def count_vowels(s: str) -> int: # Your code here - pass + pass diff --git a/string_2/double-every-nth-char/description.md b/string_2/double-every-nth-char/description.md index 321ead04..d73e2154 100644 --- a/string_2/double-every-nth-char/description.md +++ b/string_2/double-every-nth-char/description.md @@ -1,6 +1,6 @@ Write a function `double_nth_char(text: str, n: int) -> str` given a string and a positive integer n, return a modified string where every character at position n and its multiples is doubled. Count positions starting from 1. For example: -- double_nth(“hello", 2) → 'heelllo' (doubles chars at positions 2,4) +- double_nth('hello', 2) → 'heelllo' (doubles chars at positions 2,4) - double_nth('python', 3) → 'pytthonn' (doubles char at position 3,6) - double_nth('code', 1) → 'ccooddee' (doubles every char) \ No newline at end of file diff --git a/string_2/double-letter/description.md b/string_2/double-letter/description.md index ac8683a8..a2b14556 100644 --- a/string_2/double-letter/description.md +++ b/string_2/double-letter/description.md @@ -1,5 +1,5 @@ Oh no! The letter pixie took consonants from these words! -Write a function `double_letter(word)` given a string, double the second consonant in the string to form the actual word. +Write a function `double_letter(word: str) -> str` given a string, double the second consonant in the string to form the actual word. For example: diff --git a/string_2/double-letter/starter.py b/string_2/double-letter/starter.py index 2ce674e8..ddb0849c 100644 --- a/string_2/double-letter/starter.py +++ b/string_2/double-letter/starter.py @@ -1,3 +1,3 @@ -def double_letter(word): +def double_letter(word: str) -> str: # Your code here pass \ No newline at end of file diff --git a/string_2/every-other-repeated/description.md b/string_2/every-other-repeated/description.md index 2fa1ae9f..8655c7ca 100644 --- a/string_2/every-other-repeated/description.md +++ b/string_2/every-other-repeated/description.md @@ -1,4 +1,4 @@ -Write a function `every_other_repeated(a, b)` that counts how many substrings of length two, formed by taking every other letter from string `a` match the last two letters of string `b`. +Write a function `every_other_repeated(a: str, b: str) -> int` that counts how many substrings of length two, formed by taking every other letter from string `a` match the last two letters of string `b`. For example: - `every_other_repeated("ooooo", "ooooo")` → `3` diff --git a/string_2/every-other-repeated/starter.py b/string_2/every-other-repeated/starter.py index 0733ea7e..b2aaa0bc 100644 --- a/string_2/every-other-repeated/starter.py +++ b/string_2/every-other-repeated/starter.py @@ -1,3 +1,3 @@ -def every_other_repeated(a, b): +def every_other_repeated(a: str, b: str) -> int: # Your code here pass \ No newline at end of file diff --git a/string_2/middle-characters/description.md b/string_2/middle-characters/description.md index e2b87137..367ac56e 100644 --- a/string_2/middle-characters/description.md +++ b/string_2/middle-characters/description.md @@ -1,4 +1,4 @@ -Write a function `middle_characters(word: str) -> int` given a string, return the number of times the first character is repeated excluding at the first and lastindex. Keep in mind that upper-case and lower-case letters are counted as the same. +Write a function `middle_characters(word: str) -> int` given a string, return the number of times the first character is repeated excluding at the first and last index. Keep in mind that upper-case and lower-case letters are counted as the same. For example: - `middle_characters("abanAnab")` → `3` diff --git a/string_2/remove-vowels-once/description.md b/string_2/remove-vowels-once/description.md index cb176c4d..e9a09edf 100644 --- a/string_2/remove-vowels-once/description.md +++ b/string_2/remove-vowels-once/description.md @@ -1,4 +1,4 @@ -Write a function `remove_vowels_once(word: str) -> str` that takes a string and returns a new string with all the vowels (a, e, i, o, u, y) removed. Only remove the vowels, the first time they are printed in the word. +Write a function `remove_vowels_once(word: str) -> str` that takes a string and returns a new string with all the vowels (a, e, i, o, u, y) removed. Only remove the vowels, the first time they are printed in the word. For example: - `remove_vowels_once("train")` → `"trn"` (The first "a" and "i" were removed) diff --git a/string_2/remove-vowels/description.md b/string_2/remove-vowels/description.md index 9c0bb89a..f7254eb3 100644 --- a/string_2/remove-vowels/description.md +++ b/string_2/remove-vowels/description.md @@ -1,4 +1,4 @@ -In a given string, write a function `remove_vowels(strng: str) -> str` that returns said string but without any vowels. The string will always have at least one element and the inputted string will be lowercase. +In a given string, write a function `remove_vowels(string: str) -> str` that returns said string but without any vowels. The string will always have at least one element and the inputted string will be lowercase. For example: - `remove_vowels(“pranjwal”) → prnjwl` diff --git a/string_2/remove-vowels/starter.py b/string_2/remove-vowels/starter.py index 291fd399..ef803cca 100644 --- a/string_2/remove-vowels/starter.py +++ b/string_2/remove-vowels/starter.py @@ -1,3 +1,3 @@ -def remove_vowels(strng: str) -> str: +def remove_vowels(string: str) -> str: # Your code here pass diff --git a/string_2/reverse-string/description.md b/string_2/reverse-string/description.md index e9c0aaf3..fec58f8a 100644 --- a/string_2/reverse-string/description.md +++ b/string_2/reverse-string/description.md @@ -1,4 +1,4 @@ -Write a function `reverse_string(string)` that, when given a random string, returns the reverse version of the string. +Write a function `reverse_string(s: str)-> str` that, when given a random string, returns the reverse version of the string. For example: - `reverse_string("hello")` → `'olleh'` diff --git a/string_2/reverse-string/starter.py b/string_2/reverse-string/starter.py index be6da980..935e3923 100644 --- a/string_2/reverse-string/starter.py +++ b/string_2/reverse-string/starter.py @@ -1,3 +1,3 @@ -def reverse_string(string): +def reverse_string(s: str)-> str: # Your code here pass \ No newline at end of file diff --git a/string_2/same-adjacent/description.md b/string_2/same-adjacent/description.md index 97853170..90d46c07 100644 --- a/string_2/same-adjacent/description.md +++ b/string_2/same-adjacent/description.md @@ -1,4 +1,4 @@ -Write a function `same_adjacent(str, char)` that takes in a string and a single character. Return the number of times that the single character appears in the string, but only if it appears next to itself. +Write a function `same_adjacent(s: str, char: str) -> int` that takes in a string and a single character. Return the number of times that the single character appears in the string, but only if it appears next to itself. For example: - `same_adjacent("hello", "l")` → `2` diff --git a/string_2/same-adjacent/starter.py b/string_2/same-adjacent/starter.py index f3129d8c..cbfa30a8 100644 --- a/string_2/same-adjacent/starter.py +++ b/string_2/same-adjacent/starter.py @@ -1,3 +1,3 @@ -def same_adjacent(str, char): -# Your code here +def same_adjacent(s: str, char: str) -> int: + # Your code here pass \ No newline at end of file