From c0a09d0da7d8d5ce03e022eccc641e0b6b025f1a Mon Sep 17 00:00:00 2001 From: OliverMassaad Date: Sat, 14 Nov 2026 01:00:32 -0500 Subject: [PATCH] Fix inconsistent camelCase function names in descriptions Align problem description examples with snake_case function names defined in starter.py. Closes #164. Co-authored-by: Cursor --- .../neighbouring-repeats/description.md | 6 +++--- list_1_indexing/bigger-two/description.md | 6 +++--- list_1_indexing/make-ends/description.md | 6 +++--- list_1_indexing/max-of-three/description.md | 10 +++++----- list_1_indexing/plus-two/description.md | 10 +++++----- list_1_indexing/return-middle-two/description.md | 6 +++--- list_1_indexing/swap-ends/description.md | 10 +++++----- list_2_iterating/basketball-stats/description.md | 8 ++++---- list_2_iterating/exponential-list-check/description.md | 8 ++++---- list_2_iterating/list-splitter/description.md | 6 +++--- 10 files changed, 38 insertions(+), 38 deletions(-) diff --git a/level_3_complex_problems/neighbouring-repeats/description.md b/level_3_complex_problems/neighbouring-repeats/description.md index d6feeaac..05d803c9 100644 --- a/level_3_complex_problems/neighbouring-repeats/description.md +++ b/level_3_complex_problems/neighbouring-repeats/description.md @@ -3,6 +3,6 @@ Write a function `neighbour_repeat(word: str) -> str` that removes any identical For example: -- `NeighbourRepeat("hello")` → `heo` -- `NeighbourRepeat("awesome")` → `awesome` -- `NeighbourRepeat("aaaaabbbcde")` → `cde` +- `neighbour_repeat("hello")` → `heo` +- `neighbour_repeat("awesome")` → `awesome` +- `neighbour_repeat("aaaaabbbcde")` → `cde` diff --git a/list_1_indexing/bigger-two/description.md b/list_1_indexing/bigger-two/description.md index 956cca59..ce13a799 100644 --- a/list_1_indexing/bigger-two/description.md +++ b/list_1_indexing/bigger-two/description.md @@ -1,6 +1,6 @@ Start with two integer lists `a` and `b`, each of length 2. Consider the sum of the values in each list. Return the list which has the larger sum. In the event of a tie, return `a`. For example: -- `biggerTwo([1, 2], [3, 4]) → [3, 4]` -- `biggerTwo([3, 4], [1, 2]) → [3, 4]` -- `biggerTwo([1, 1], [1, 2]) → [1, 2]` +- `bigger_two([1, 2], [3, 4]) → [3, 4]` +- `bigger_two([3, 4], [1, 2]) → [3, 4]` +- `bigger_two([1, 1], [1, 2]) → [1, 2]` diff --git a/list_1_indexing/make-ends/description.md b/list_1_indexing/make-ends/description.md index 8396610e..bd4504a3 100644 --- a/list_1_indexing/make-ends/description.md +++ b/list_1_indexing/make-ends/description.md @@ -1,6 +1,6 @@ Given a list of ints, return a new list length 2 containing the first and last elements from the original list. The original list will be length 1 or more. -- `makeEnds([1, 2, 3])` → `[1, 3]` -- `makeEnds([1, 2, 3, 4])` → `[1, 4]` -- `makeEnds([7, 4, 6, 2])` → `[7, 2]` +- `make_ends([1, 2, 3])` → `[1, 3]` +- `make_ends([1, 2, 3, 4])` → `[1, 4]` +- `make_ends([7, 4, 6, 2])` → `[7, 2]` diff --git a/list_1_indexing/max-of-three/description.md b/list_1_indexing/max-of-three/description.md index 8546f3bb..0a98e57a 100644 --- a/list_1_indexing/max-of-three/description.md +++ b/list_1_indexing/max-of-three/description.md @@ -1,8 +1,8 @@ Given a list of integers with an odd length, look at the first, last, and middle values in the list and return the largest of these three values. The list will always have at least one element. For example: -- `maxOfThree([1, 2, 3]) → 3` (first: 1, last: 3, middle: 2) -- `maxOfThree([4, 7, 1, 8, 5]) → 5` (first: 4, last: 5, middle: 1) -- `maxOfThree([9, 2, 6, 3, 7, 4, 5]) → 9` (first: 9, last: 5, middle: 6) -- `maxOfThree([10]) → 10` (first: 10, last: 10, middle: 10) -- `maxOfThree([2, 4, 1, 3, 7]) → 7` (first: 2, last: 7, middle: 1) +- `max_of_three([1, 2, 3]) → 3` (first: 1, last: 3, middle: 2) +- `max_of_three([4, 7, 1, 8, 5]) → 5` (first: 4, last: 5, middle: 1) +- `max_of_three([9, 2, 6, 3, 7, 4, 5]) → 9` (first: 9, last: 5, middle: 6) +- `max_of_three([10]) → 10` (first: 10, last: 10, middle: 10) +- `max_of_three([2, 4, 1, 3, 7]) → 7` (first: 2, last: 7, middle: 1) diff --git a/list_1_indexing/plus-two/description.md b/list_1_indexing/plus-two/description.md index 54b03c0e..88ac63b7 100644 --- a/list_1_indexing/plus-two/description.md +++ b/list_1_indexing/plus-two/description.md @@ -1,8 +1,8 @@ Given two integer lists of arbitrary length, return a new list of length equal to the sum of the lengths of the two input lists, containing all the elements from both lists concatenated together. For example: -- `plusTwo([1, 2], [3, 4]) → [1, 2, 3, 4]` -- `plusTwo([4, 4], [2, 2]) → [4, 4, 2, 2]` -- `plusTwo([9, 2], [3, 4]) → [9, 2, 3, 4]` -- `plusTwo([5], [6, 7, 8]) → [5, 6, 7, 8]` -- `plusTwo([], [1, 2, 3]) → [1, 2, 3]` +- `plus_two([1, 2], [3, 4]) → [1, 2, 3, 4]` +- `plus_two([4, 4], [2, 2]) → [4, 4, 2, 2]` +- `plus_two([9, 2], [3, 4]) → [9, 2, 3, 4]` +- `plus_two([5], [6, 7, 8]) → [5, 6, 7, 8]` +- `plus_two([], [1, 2, 3]) → [1, 2, 3]` diff --git a/list_1_indexing/return-middle-two/description.md b/list_1_indexing/return-middle-two/description.md index df882b25..d2343492 100644 --- a/list_1_indexing/return-middle-two/description.md +++ b/list_1_indexing/return-middle-two/description.md @@ -1,6 +1,6 @@ Given a list of integers of even length, return a new list of length 2 containing the middle two elements from the original list. The original list will always be of length 2 or more. For example: -- `middleTwo([1, 2, 3, 4]) → [2, 3]` -- `middleTwo([7, 1, 5, 9]) → [1, 5]` -- `middleTwo([5, 8]) → [5, 8]` +- `middle_two([1, 2, 3, 4]) → [2, 3]` +- `middle_two([7, 1, 5, 9]) → [1, 5]` +- `middle_two([5, 8]) → [5, 8]` diff --git a/list_1_indexing/swap-ends/description.md b/list_1_indexing/swap-ends/description.md index 8c8399e8..45b316e6 100644 --- a/list_1_indexing/swap-ends/description.md +++ b/list_1_indexing/swap-ends/description.md @@ -1,8 +1,8 @@ Given a list of integers, swap the first and last elements in the list. Return the modified list. The list will always have at least one element. For example: -- `swapEnds([1, 2, 3, 4]) → [4, 2, 3, 1]` -- `swapEnds([1, 2, 3]) → [3, 2, 1]` -- `swapEnds([8, 6, 7, 9, 5]) → [5, 6, 7, 9, 8]` -- `swapEnds([10]) → [10]` -- `swapEnds([2, 4]) → [4, 2]` +- `swap_ends([1, 2, 3, 4]) → [4, 2, 3, 1]` +- `swap_ends([1, 2, 3]) → [3, 2, 1]` +- `swap_ends([8, 6, 7, 9, 5]) → [5, 6, 7, 9, 8]` +- `swap_ends([10]) → [10]` +- `swap_ends([2, 4]) → [4, 2]` diff --git a/list_2_iterating/basketball-stats/description.md b/list_2_iterating/basketball-stats/description.md index f130c87c..4bf07120 100644 --- a/list_2_iterating/basketball-stats/description.md +++ b/list_2_iterating/basketball-stats/description.md @@ -6,17 +6,17 @@ Calculate how many total points they have, as well as their FG% (shots made / sh Example: `"66.666%" = "66%"` (Hint: `import math`, then use `math.floor()`) -Write a function `bball_stats(twos: int, threes: int, shotsTaken: int)` that takes three integer inputs, `twos`, `threes`, and `shotsTaken`. +Write a function `basketball_stats(twos: int, threes: int, shotsTaken: int)` that takes three integer inputs, `twos`, `threes`, and `shotsTaken`. Return a list with an `int` and a `str`, where the `int` is their total amount of points and the `str` is the field goal percentage as a number with a percent. Examples: -- `bball_stats(1, 1, 2) == [5, "100%"]` +- `basketball_stats(1, 1, 2) == [5, "100%"]` 1 two-pointer and 1 three-pointer = 5 points. The player took 2 shots, but also made 2 shots, so their FG% is 100%. -- `bball_stats(0, 0, 5) == [0, "0%"]` +- `basketball_stats(0, 0, 5) == [0, "0%"]` 0 two-pointers and 0 three-pointers = 0 points. The player took 5 shots, but made 0 shots, so their FG% is 0%. -- `bball_stats(2, 0, 3) == [4, "66%"]` +- `basketball_stats(2, 0, 3) == [4, "66%"]` 2 two-pointers and 0 three-pointers = 4 points. The player took 3 shots, but made 2 shots, so their FG% is 66%. diff --git a/list_2_iterating/exponential-list-check/description.md b/list_2_iterating/exponential-list-check/description.md index 62451b3f..5095411e 100644 --- a/list_2_iterating/exponential-list-check/description.md +++ b/list_2_iterating/exponential-list-check/description.md @@ -1,7 +1,7 @@ Given a list of integers, determine if each of the integers in the list is strictly bigger than the last. If so, return True, otherwise return False. The list will always be at least of length 2. For example: -- `exponentialListCheck([1, 2, 3]) → True` -- `exponentialListCheck([2, 1, 5, 10, 9]) → False` -- `exponentialListCheck([10, 288, 300, 319]) → True` -- `exponentialListCheck([1, 1, 3]) → False` +- `exponential_list_check([1, 2, 3]) → True` +- `exponential_list_check([2, 1, 5, 10, 9]) → False` +- `exponential_list_check([10, 288, 300, 319]) → True` +- `exponential_list_check([1, 1, 3]) → False` diff --git a/list_2_iterating/list-splitter/description.md b/list_2_iterating/list-splitter/description.md index 3cf10782..d7a5c630 100644 --- a/list_2_iterating/list-splitter/description.md +++ b/list_2_iterating/list-splitter/description.md @@ -1,7 +1,7 @@ Given a list of integers and strings, return a list of only the strings. For example: - - `elementArranger([1,”a”,3]) -> [“a”]` - - `elementArranger([“Hershey”,”c”,3,7,5]) -> [“Hershey”,"c"]` - - `elementArranger([10,20,36]) -> []` + - `list_splitter([1,”a”,3]) -> [“a”]` + - `list_splitter([“Hershey”,”c”,3,7,5]) -> [“Hershey”,"c"]` + - `list_splitter([10,20,36]) -> []`