kyu_8.holiday_vi_shark_pontoon package

Submodules

kyu_8.holiday_vi_shark_pontoon.shark module

kyu_8.holiday_vi_shark_pontoon.shark.shark(pontoonDistance, sharkDistance, youSpeed, sharkSpeed, dolphin) → str[source]

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 to swim to safety in metres, youSpeed = how fast you can swim in metres/second, dolphin = a boolean, if true, you can half the swimming speed of the shark as the dolphin will attack it.

If you make it, return “Alive!”, if not, return “Shark Bait!”.

Parameters
  • pontoonDistance

  • sharkDistance

  • youSpeed

  • sharkSpeed

  • dolphin

Returns

kyu_8.holiday_vi_shark_pontoon.test_shark module

class kyu_8.holiday_vi_shark_pontoon.test_shark.SharkTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing shark function

test_shark_alive_1()[source]

Testing shark function -> positive :return:

test_shark_alive_2()[source]

Testing shark function -> positive :return:

test_shark_bait()[source]

Testing shark function -> negative :return:

Module contents