What are the differences between CSS Grid and Flexbox, and when would you choose one over the other?
Implement a classifier that recommends grid for two-dimensional layouts and flexbox for one-dimensional layouts. The input is a dictionary of boolean layout requirements, and the output is the recommended CSS layout mode.
Use grid when both row and column placement must be controlled, or when explicit two-dimensional alignment is required. Otherwise, use flexbox for arranging items along one primary axis.
two_dimensional and explicit_tracksgrid or flexboxdef choose_layout(requirements):