Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored Aug 19, 2022
1 parent 1451a28 commit f1ce424
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Transportation_on_vacation_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Work out the price of a rental car that costs £40 a day, you get 20 off if you hire for three or more days and 50 off if you hire for 7 or more
# Find the overall cost without reductions by timsing days by 40
# Subtract reductions based on length of days

def rental_car_cost(d):
cost = (d * 40)
if d >= 3:
cost -= 20
if d >= 7:
cost -= 30
return cost

0 comments on commit f1ce424

Please sign in to comment.