Codington
0 of 6 problems solved • 0%

Exercise prompt

Pack Whole Boxes

With positive integers, // counts whole groups and % gives the remainder. For example, 17 // 5 is 3 and 17 % 5 is 2.

Example

minutes = 135 print(minutes // 60) # 2 complete hours print(minutes % 60) # 15 extra minutes

Two full hours account for 120 minutes. The remaining 15 minutes explain why the quotient alone loses information.

Your task

Use pencils and box_size to calculate full_boxes and loose_pencils. Print the two numbers on one line, separated by a space. Try changing the pencil count to an exact multiple while experimenting, then restore the supplied values. The supplied values should display 3 5.