How would you use python to work out how many blocks of a given size would fit into an area of a given size.
Lets say I have a rectangle of X x Y and I have an area of x1 x y1. How would I work out how many of the rectangle would fit into that area and what would be the best fit?
This is an instance of a Packing problem. A nice algorithm for packing rectangles inside of a rectangle is described here. You’ll need to write it in python, obviously.