kyu_8.keep_hydrated package

Submodules

kyu_8.keep_hydrated.keep_hydrated module

Solution for -> Keep Hydrated!.

Created by Egor Kostan. GitHub: https://github.com/ikostan

kyu_8.keep_hydrated.keep_hydrated.litres(time) int[source]

‘litres’ function.

Because Nathan knows it is important to stay hydrated, he drinks 0.5 litres of water per hour of cycling.

You get given the time in hours and you need to return the number of litres Nathan will drink, rounded to the smallest value. :param time: :return:

kyu_8.keep_hydrated.test_keep_hydrated module

Test for -> Keep Hydrated!.

Created by Egor Kostan. GitHub: https://github.com/ikostan

class kyu_8.keep_hydrated.test_keep_hydrated.KeepHydratedTestCase(methodName='runTest')[source]

Bases: TestCase

Testing litres function.

_classSetupFailed = False
_class_cleanups = []
test_keep_hydrated = None
test_keep_hydrated_0(**kw)

Testing litres function with various test inputs [with hours=2, expected=1, message=’should return 1 litre’].

Returns:

test_keep_hydrated_1(**kw)

Testing litres function with various test inputs [with hours=1.4, expected=0, message=’should return 0 litres’].

Returns:

test_keep_hydrated_2(**kw)

Testing litres function with various test inputs [with hours=12.3, expected=6, message=’should return 6 litres’].

Returns:

test_keep_hydrated_3(**kw)

Testing litres function with various test inputs [with hours=0.82, expected=0, message=’should return 0 litres’].

Returns:

test_keep_hydrated_4(**kw)

Testing litres function with various test inputs [with hours=11.8, expected=5, message=’should return 5 litres’].

Returns:

test_keep_hydrated_5(**kw)

Testing litres function with various test inputs [with hours=1787, expected=893, message=’should return 893 litres’].

Returns:

test_keep_hydrated_6(**kw)

Testing litres function with various test inputs [with hours=0, expected=0, message=’should return 0 litres’].

Returns:

Module contents

Keep Hydrated.