kyu_7.fill_the_hard_disk_drive package

Submodules

kyu_7.fill_the_hard_disk_drive.save module

kyu_7.fill_the_hard_disk_drive.save.save(sizes: list, hd: int) → int[source]

Your task is to determine how many files of the copy queue you will be able to save into your Hard Disk Drive.

Input: Array of file sizes (0 <= s <= 100) Capacity of the HD (0 <= c <= 500)

Output: Number of files that can be fully saved in the HD

Parameters
  • sizes

  • hd

Returns

kyu_7.fill_the_hard_disk_drive.test_save module

class kyu_7.fill_the_hard_disk_drive.test_save.SaveTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Testing ‘save’ function

test_save_negative()[source]

Testing ‘save’ function: negative

The function should determine how many files of the copy queue you will be able to save into your Hard Disk Drive. :return:

test_save_positive()[source]

Testing ‘save’ function: positive

The function should determine how many files of the copy queue you will be able to save into your Hard Disk Drive. :return:

Module contents