We can define the percent error as the difference between the estimated value and the actual value, divided by the actual value.
In this case, the estimated value (what Jimmy thought he had purchased) is 7 and the actual value is 6.
Then, the percent error is:

The percent error is 16%.