A square grid that fits all the photos

Write code · Medium · §12.2 import

You place n photos in a square grid on an album screen. Store in side the number of cells on one side of the smallest square grid that fits all the photos, as an integer. With 10 photos, a grid with 3 cells on a side holds only 9, so side is 4. Import the math module and solve it with math.sqrt().

Starter code

n = 10

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.