To find out how much money Mary had before she bought the computer, we can add the amount she has left to the cost of the computer.
She has $21.56 left and the computer cost $299.
So, the calculation is:
Amount before buying the computer = Cost of the computer + Amount left Amount before buying the computer = $299 + $21.56
Now, let's calculate:
$299 + $21.56 = $320.56
Therefore, Mary had $320.56 before she bought the computer.