Problem Description
In the United States, fuel efficiency for vehicles is normally expressed in miles-pergallon (MPG).
In Canada, fuel efficiency is normally expressed in liters-per-hundred kilometers (L/100 km).
Use your research skills to determine how to convert from MPG to L/100 km.
Then create a program that reads a value from the user in American units and displays the equivalent fuel efficiency in Canadian units.
Note:
Formula is --> 282.48 / fuel efficiency in MPG.CODING ARENA
a=int(input())
b=282.48/a
print(round(b,2))
Test Case 1
Input (stdin)24
Expected Output11.77
Test Case 2
Input (stdin)25
Expected Output11.3
✖
Share this Posts
Subscribe Our Newsletter
0 Comment
Post a Comment