Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Main:
- def __init__(self):
- mpg = float(raw_input("Enter mileage in miles per gallon: "))
- metric = self.convert_mileage(mpg)
- print("Your mileage is " + str(metric) + " L/100km.")
- def convert_mileage(self,mpg):
- lk = (100 * 3.7854)/(1.6093 * float(mpg))
- return lk
- Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement