aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pizza2.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pizza2.py b/pizza2.py
new file mode 100644
index 0000000..ab09890
--- /dev/null
+++ b/pizza2.py
@@ -0,0 +1,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))
+