Ad
  • Custom User Avatar

    Not the best looking chunk of code :P thats why I made a second attemp

  • Custom User Avatar

    I really like this approach, however this solution fails the single bus scenario

    def test_single_adult_scenario(self):
        kids = 40
        adults = 9
        places = 12
        expected_result = 5
    
        result = buses(kids, adults, places)
    
        assert result == expected_result # the result is 0, the expected is 5