Question · Vibe coding with Claude Code course · Module 14: Pinterest clone

Quiz: A ratio instead of pixels

Why does distributePins add pin.height / pin.width to the column height, and not the height in pixels?

Answer options

  • Because the height in pixels changes after every image download
  • Because next/image always scales images to a width of 600 pixels
  • The columns have equal width, so the ratio is enough to compare them, whatever the window width
  • Because the ratio rounds heights to whole pixels

You can check the correct answer by solving this task in the CodeWorlds game.