To find the miles per gallon (mpg) that Wally's car achieves, you can use the formula:
\[ \text{Miles per gallon} = \frac{\text{Total miles traveled}}{\text{Total gallons of gas used}} \]
In this case, Wally's car travels 340 miles on 12.9 gallons of gas:
\[ \text{Miles per gallon} = \frac{340 \text{ miles}}{12.9 \text{ gallons}} \approx 26.4 \text{ mpg} \]
Therefore, Wally's car achieves approximately 26.4 miles per gallon.