diff --git a/create_box/main.py b/create_box/main.py index e66c150..31fd2a2 100644 --- a/create_box/main.py +++ b/create_box/main.py @@ -1,6 +1,6 @@ def create_box(height, width, character): - pass - + for i in character: + return str(i * width +'\n') * height # Tests: @@ -29,3 +29,6 @@ def test_second_box(): assert create_box(1, 1, '@') == second_box_expected # Write your own test using the `third_box_expected` box + +def test_third_box(): + assert create_box(3, 24, 'x') == third_box_expected \ No newline at end of file diff --git a/highest_number_cubed/main.py b/highest_number_cubed/main.py index efaac50..de8de8a 100644 --- a/highest_number_cubed/main.py +++ b/highest_number_cubed/main.py @@ -1,5 +1,9 @@ def highest_number_cubed(limit): - pass + result = [] + for i in range(1, limit): + if (i **3 < limit): + result.append(i) + return result.pop() def test_three(): diff --git a/list_of_prime_numbers/main.py b/list_of_prime_numbers/main.py index a55629b..7228ecd 100644 --- a/list_of_prime_numbers/main.py +++ b/list_of_prime_numbers/main.py @@ -1,10 +1,18 @@ def _is_prime(number): - pass + for i in range(2, number): + if (number % i) == 0: + return False + return True def list_of_prime_numbers(max_number): - pass + result = [] + a = max_number + 1 + for i in range(2, a): + if _is_prime(i): + result.append(i) + return result # =================== # # ====== Tests ====== #