Skip to content

Commit

Permalink
# Holiday VI - Shark Pontoon
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 24, 2024
1 parent 2e5bc5a commit 07c1851
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions kyu_8/holiday_vi_shark_pontoon/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Holiday VI - Shark Pontoon."""
6 changes: 4 additions & 2 deletions kyu_8/holiday_vi_shark_pontoon/shark.py
Original file line number Diff line number Diff line change
@@ -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
"""
Expand All @@ -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
Expand All @@ -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:
Expand Down
16 changes: 9 additions & 7 deletions kyu_8/holiday_vi_shark_pontoon/test_shark.py
Original file line number Diff line number Diff line change
@@ -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
"""
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 07c1851

Please sign in to comment.