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', positive = True, integer = True) solve((x * y - 24,x - y - 2),(x,y))
[(6, 4)]