kyu_7.simple_fun_152 package

Submodules

kyu_7.simple_fun_152.invite_more_women module

Solution for -> Simple Fun #152: Invite More Women?.

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

kyu_7.simple_fun_152.invite_more_women.invite_more_women(arr: list) bool[source]

Invite More Women function.

Arthur wants to make sure that there are at least as many women as men at this year’s party. He gave you a list of integers of all the party goers.

Arthur needs you to return true if he needs to invite more women or false if he is all set.

An array representing the genders of the attendees, where -1 represents women and 1 represents men. :param arr: :return:

kyu_7.simple_fun_152.test_invite_more_women module

Test for -> Simple Fun #152: Invite More Women?.

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

class kyu_7.simple_fun_152.test_invite_more_women.InviteMoreWomenTestCase(methodName='runTest')[source]

Bases: TestCase

Testing invite_more_women function.

_classSetupFailed = False
_class_cleanups = []
test_invite_more_women_negative = None
test_invite_more_women_negative_0(**kw)

Testing invite_more_women function (negative) [with arr=[1, -1, 1], expected=True].

Returns:

test_invite_more_women_negative_1(**kw)

Testing invite_more_women function (negative) [with arr=[1, 1, 1], expected=True].

Returns:

test_invite_more_women_positive = None
test_invite_more_women_positive_0(**kw)

Testing invite_more_women function (positive) [with arr=[-1, -1, -1], expected=False].

Returns:

test_invite_more_women_positive_1(**kw)

Testing invite_more_women function (positive) [with arr=[1, -1], expected=False].

Returns:

test_invite_more_women_positive_2(**kw)

Testing invite_more_women function (positive) [with arr=[], expected=False].

Returns:

Module contents

Simple Fun #152: Invite More Women.