In [8]:
from sympy import *
# Jane has six times as many dimes as quarters in her piggy bank.
# She has 21 coins in her piggy bank totaling \$2.55
# How many dimes and quarters does Jane have?

var('dimes quarters', integer = True, positive = True)
solve((dimes - 6 * quarters, dimes + quarters - 21, dimes * 10 + quarters * 25 - 255),(dimes,quarters))

Out[8]:
{dimes: 18, quarters: 3}