kyu_8.wolf_in_sheep_clothing package

Submodules

kyu_8.wolf_in_sheep_clothing.test_wolf_in_sheep_clothing module

class kyu_8.wolf_in_sheep_clothing.test_wolf_in_sheep_clothing.WarnTheSheepTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing warn_the_sheep function

test_warn_the_sheep_wolf_at_end()[source]

If the wolf is not the closest animal to you, return “Oi! Sheep number N! You are about to be eaten by a wolf!” where N is the sheep’s position in the queue. :return:

test_warn_the_sheep_wolf_at_start()[source]

If the wolf is the closest animal to you, return “Pls go away and stop eating my sheep”. :return:

test_warn_the_sheep_wolf_in_middle()[source]

If the wolf is the closest animal to you, return “Pls go away and stop eating my sheep”. :return:

kyu_8.wolf_in_sheep_clothing.wolf_in_sheep_clothing module

kyu_8.wolf_in_sheep_clothing.wolf_in_sheep_clothing.warn_the_sheep(queue: list) → str[source]

Warn the sheep in front of the wolf that it is about to be eaten.

If the wolf is the closest animal to you, return “Pls go away and stop eating my sheep”.

Otherwise, return “Oi! Sheep number N! You are about to be eaten by a wolf!” where N is the sheep’s position in the queue.

Parameters

queue

Returns

Module contents