kyu_7.growing_plant package

Submodules

kyu_7.growing_plant.growing_plant module

Solution -> Simple Fun #74: Growing Plant.

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

kyu_7.growing_plant.growing_plant.growing_plant(up_speed: int, down_speed: int, desired_height: int) int[source]

Growing Plant function.

Each day a plant is growing by upSpeed meters. Each night that plant’s height decreases by downSpeed meters due to the lack of sun heat. Initially, plant is 0 meters tall. We plant the seed at the beginning of a day. We want to know when the height of the plant will reach a certain level. :param up_speed: int :param down_speed: int :param desired_height: int :return: int

kyu_7.growing_plant.test_growing_plant module

Test -> Simple Fun #74: Growing Plant.

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

class kyu_7.growing_plant.test_growing_plant.GrowingPlantTestCase(methodName='runTest')[source]

Bases: TestCase

Testing growing_plant function.

_classSetupFailed = False
_class_cleanups = []
test_growing_plant = None
test_growing_plant_0(**kw)

Testing growing_plant function [with input_data=(100, 10, 910), expected=10].

Returns:

test_growing_plant_1(**kw)

Testing growing_plant function [with input_data=(10, 9, 4), expected=1].

Returns:

test_growing_plant_2(**kw)

Testing growing_plant function [with input_data=(5, 2, 0), expected=1].

Returns:

test_growing_plant_3(**kw)

Testing growing_plant function [with input_data=(5, 2, 5), expected=1].

Returns:

test_growing_plant_4(**kw)

Testing growing_plant function [with input_data=(5, 2, 6), expected=2].

Returns:

Module contents

Simple Fun #74: Growing Plant.