aboutsummaryrefslogtreecommitdiffstats
path: root/pizza2.py
blob: ab098908d0f74fcdc4de6445fa44442e67797968 (plain)
1
2
3
4
5
6
7
8
9
10
gas_price = 2.6
wear_tear = 0.1
mpg = 30
total_price = float(input('Total Price: '))
amt_given = float(input('Amount Given: '))
tip = amt_given - total_price
print('Tip given = {}'.format(tip))
trip_distance = float(input('Miles: '))
print (tip-(gas_price / trip_distance + tip * wear_tear))