Skip to content

Commit 7b28f6d

Browse files
committed
Remove print statements and example usages from multiple functions for cleaner code
1 parent decfeab commit 7b28f6d

4 files changed

Lines changed: 0 additions & 13 deletions

File tree

‎Sprint-1/Python/calculate_sum_and_product/calculate_sum_and_product.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ def calculate_sum_and_product(input_numbers: List[int]) -> Dict[str, int]:
1212
return {"sum": total_sum, "product": total_product}
1313

1414

15-
print(calculate_sum_and_product([2, 3, 5]))
16-
# {'sum': 10, 'product': 30}
1715
"""
1816
Time Complexity: O(n)
1917
Space Complexity: O(1)

‎Sprint-1/Python/find_common_items/find_common_items.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ def find_common_items(
1919
return common_items
2020

2121

22-
print(find_common_items([1, 2, 3, 4], [2, 3, 5]))
23-
# [2, 3]
24-
2522
"""
2623
Find common items between two arrays.
2724

‎Sprint-1/Python/has_pair_with_sum/has_pair_with_sum.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ def has_pair_with_sum(numbers, target_sum):
1313
return False
1414

1515

16-
print(has_pair_with_sum([2, 4, 6, 8], 10))
17-
# True
18-
19-
print(has_pair_with_sum([1, 2, 3], 10))
20-
# False
2116
"""
2217
Find if there is a pair of numbers that sum to a target value.
2318

‎Sprint-1/Python/remove_duplicates/remove_duplicates.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ def remove_duplicates(values):
1111
return unique_items
1212

1313

14-
print(remove_duplicates([1, 2, 2, 3, 1, 4]))
15-
# [1, 2, 3, 4]
16-
1714
"""
1815
Remove duplicate values from a sequence,
1916
preserving the order of the first occurrence.

0 commit comments

Comments
 (0)