You will write three functions for a cube that is cut into smaller cubes. One counts the small cubes. One finds their total surface area. One finds how many times bigger the area has become.
The idea. A cube with pieces along each edge is cut into small cubes, each with side . A cube of side has a surface area of . The volume does not change, but the total area does.
Your tasks.
pieces(n).total_area(side, n). It returns the total surface area of all the small cubes.area_ratio(side, n). It returns the total area of the small cubes divided by the area of the original cube.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…