Learn to Program Step-by-Step

Gas Price Problem

Gas Price Problem

In February of 2015, the price of gas in the United States was $2.17 per gallon. The price of gas in Italy is 1.64 € per liter.

gallons and liters

Who pays more? What would you need to know to solve this problem? Which values are constant? Which values vary?

Problem: In Italy they pay 1.64Euros per liter. What is the equivalent price per gallon in dollars?

Before you continue with this lesson, try to write down step-by-step instructions for your friend to follow to calculate the miles per gallon for the car. This is an algorithm for calculating MPG.

Hint: If you aren't sure how to solve this, try breaking it into steps.

  • How many liters in a gallon?
  • How can you convert a price in Euros to dollars?

Test your algorithm by walking through all of the steps on paper. Write down some sample numbers and do all of the calculations.

Now look at the next page

Like us on Facebook:

OER: Open Educational Resource
Creative Commons License Author: Janet E. Joy; Publisher: Zebra0.com
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Creative Commons Attribution-NonCommercial 4.0 International License
Last modified: April 15 2016 15:52:03.