from sympy import * # The area of a rectangle is 24 square cm. # The width is two less than the length. # What is the length and width of the rectangle? var('x y') solve((x * y - 24,x - y - 2),(x,y))

[(-4, -6), (6, 4)]