From 07c185194fafa24406c8848740e1489f52982dce Mon Sep 17 00:00:00 2001 From: Egor Kostan <20955183+ikostan@users.noreply.github.com> Date: Tue, 24 Dec 2024 04:50:24 -0800 Subject: [PATCH] # Holiday VI - Shark Pontoon --- kyu_8/holiday_vi_shark_pontoon/__init__.py | 1 + kyu_8/holiday_vi_shark_pontoon/shark.py | 6 ++++-- kyu_8/holiday_vi_shark_pontoon/test_shark.py | 16 +++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/kyu_8/holiday_vi_shark_pontoon/__init__.py b/kyu_8/holiday_vi_shark_pontoon/__init__.py index e69de29bb2d..d2ec6b21e8c 100644 --- a/kyu_8/holiday_vi_shark_pontoon/__init__.py +++ b/kyu_8/holiday_vi_shark_pontoon/__init__.py @@ -0,0 +1 @@ +"""Holiday VI - Shark Pontoon.""" diff --git a/kyu_8/holiday_vi_shark_pontoon/shark.py b/kyu_8/holiday_vi_shark_pontoon/shark.py index c1b97b07c7b..2decb2b5b55 100644 --- a/kyu_8/holiday_vi_shark_pontoon/shark.py +++ b/kyu_8/holiday_vi_shark_pontoon/shark.py @@ -1,5 +1,6 @@ """ -Solution for -> Holiday VI - Shark Pontoon +Solution for -> Holiday VI - Shark Pontoon. + Created by Egor Kostan. GitHub: https://github.com/ikostan """ @@ -11,6 +12,8 @@ def shark(pontoon_distance, shark_speed, dolphin) -> str: """ + Shark function. + You are given 5 variables: sharkDistance = distance the shark needs to cover to eat you in metres, sharkSpeed = how fast it can move in metres/second, pontoonDistance = how far you need @@ -19,7 +22,6 @@ def shark(pontoon_distance, the swimming speed of the shark as the dolphin will attack it. If you make it, return "Alive!", if not, return "Shark Bait!". - :param pontoon_distance: :param shark_distance: :param you_speed: diff --git a/kyu_8/holiday_vi_shark_pontoon/test_shark.py b/kyu_8/holiday_vi_shark_pontoon/test_shark.py index 712bc97e21c..350946571f7 100644 --- a/kyu_8/holiday_vi_shark_pontoon/test_shark.py +++ b/kyu_8/holiday_vi_shark_pontoon/test_shark.py @@ -1,5 +1,6 @@ """ -Test for -> Holiday VI - Shark Pontoon +Test for -> Holiday VI - Shark Pontoon. + Created by Egor Kostan. GitHub: https://github.com/ikostan """ @@ -26,13 +27,12 @@ url='https://www.codewars.com/kata/57e921d8b36340f1fd000059', name='Source/Kata') class SharkTestCase(unittest.TestCase): - """ - Testing shark function - """ + """Testing shark function.""" def test_shark_alive_1(self): """ - Testing shark function -> positive + Testing shark function -> positive #1. + :return: """ # pylint: disable=R0801 @@ -66,7 +66,8 @@ def test_shark_alive_1(self): def test_shark_alive_2(self): """ - Testing shark function -> positive + Testing shark function -> positive #2. + :return: """ # pylint: disable=R0801 @@ -100,7 +101,8 @@ def test_shark_alive_2(self): def test_shark_bait(self): """ - Testing shark function -> negative + Testing shark function -> negative. + :return: """ # pylint: disable=R0801