Advertisement
Guest User

Mileage

a guest
Dec 10th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. fill = input("gallons to fill:")
  2. fill = (int(fill))
  3. distance = input("distance traveled (miles):")
  4. distance = (int(distance))
  5.  
  6. def mileage_calc():
  7.     mileage=(distance/fill)
  8.     print("Miles/Gallon:", mileage)
  9.    
  10.    
  11. mileage_calc()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement