python_exercises/thinkcspy/Chapter-2-Exercises/problem10.py

13 lines
298 B
Python
Raw Normal View History

# Runestone.Academy thinkcspy course
# Chapter 2
# Problem 10
miles = input('How many miles did you drive before refueling?')
mi = int(miles)
gallons = input('How many gallons did you use to refuel your vehicle?')
gal = int(gallons)
mpg = mi / gal
print('Your fuel efficiency is', mpg, 'MPG.')