kyu_8.will_there_be_enough_space package

Submodules

kyu_8.will_there_be_enough_space.enough module

kyu_8.will_there_be_enough_space.enough.enough(cap: int, on: int, wait: int) → int[source]

The driver wants you to write a simple program telling him if he will be able to fit all the passengers.

If there is enough space, return 0, and if there isn’t, return the number of passengers he can’t take.

You have to write a function that accepts three parameters:

cap is the amount of people the bus can hold excluding the driver. on is the number of people on the bus. wait is the number of people waiting to get on to the bus.

Parameters
  • cap

  • on

  • wait

Returns

kyu_8.will_there_be_enough_space.test_enough module

class kyu_8.will_there_be_enough_space.test_enough.EnoughTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing enough function

test_enough()[source]

Testing enough function with various test data

If there is enough space, return 0, and if there isn’t, return the number of passengers he can’t take. :return:

Module contents