Open in CoCalc with one click!
%var figure, banana, clock
s = solve([figure + figure + figure == 45, banana + banana + figure == 23, banana+clock+clock==10], [figure, banana, clock], solution_dict=True)[0] s
{figure: 15, clock: 3, banana: 4}
s[clock] + s[banana] + s[banana] * s[figure]
67
# or if the puzzle is stupid regarding order of operations... (s[clock] + s[banana] + s[banana]) * s[figure]
165