x=float(input("How many miles can your vehicle travel on 1 gallon of gasoline?: "))
y=float(input("How much does 1 gallon of gasoline cost?: "))
print('20 miles: {:.2f}$\\75 miles: {:.2f}$\\500 miles: {:.2f}$'.format((20/x)*y, (75/x)*y, (500/x)*y))
1.6m questions
2.0m answers