kyu_6.potion_class_101 package

Submodules

kyu_6.potion_class_101.potion module

class kyu_6.potion_class_101.potion.Potion(color: Tuple[int, int, int], volume: int)[source]

Bases: object

This is your first potion class in Hogwarts and professor gave you a homework to figure out what color potion will turn into if he’ll mix it with some other potion. All potions have some color that written down as RGB color from [0, 0, 0] to [255, 255, 255]. To make task more complicated teacher will do few mixing and after will ask you for final color. Besides color you also need to figure out what volume will have potion after final mix.

property color
mix(other) → object[source]

Based on your programming background you managed to figure that after mixing two potions colors will mix as if mix two RGB colors.

Note: Use ceiling when calculating the resulting potion’s color. :param other: :return:

property volume

kyu_6.potion_class_101.test_potion module

class kyu_6.potion_class_101.test_potion.PotionTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_potion()[source]

Module contents