aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbwalterscoding <40584788+bwalterscoding@users.noreply.github.com>2018-08-06 12:24:47 -0400
committerGitHub <noreply@github.com>2018-08-06 12:24:47 -0400
commitc0b98e7d7fe1644bd509a0c0810c096d9a597677 (patch)
tree036f286dd8a2e247bfb5066fd41fbabf84c69470
parent5c686fac467d85207690329397f480d2eab5e39a (diff)
Add files via upload
-rw-r--r--pizza2.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pizza2.py b/pizza2.py
index d80b5dc..58554c2 100644
--- a/pizza2.py
+++ b/pizza2.py
@@ -1,12 +1,18 @@
+import datetime
while True:
+
gas_price = 2.6 #Avg gas price in NC
wear_tear = 0.1 #estimated 10 cents per mile in tire and engine wear
mpg = 30 # my car gets 30 miles per gallon
delivery_charge = 1.25 #dominos pays the driver $1.25 each delivery
+ now = datetime.datetime.now()
+ print("Tip Tracker. All data based on 30 mpg at $2.60 a gallon and 10 cents of wear n tear each mile")
total_price = float(input('Total Price: ')) #Total price of order
amt_given = float(input('Amount Given: ')) #Total amount of money received from customer
tip = amt_given - total_price #This is your total Gross Tip
print('Tip given = {}'.format(tip)) #This prints your tip and saves the tip as a variable ( I think..lol)
trip_distance = float(input('Miles: ')) # This is your round trip distance in miles
+ print ("Your net tip is...")
print (tip + delivery_charge -(gas_price / trip_distance + tip * wear_tear)) #This prints your Net Tip after factoring in the delivery charge, gas, and wear n tear
-
+ print ("Current date and time : ")
+ print (now.strftime("%Y-%m-%d %H:%M:%S"))