Advertisement
exDotaPro

2019_2_may_2_safari

Feb 1st, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. budget = float(input())
  2. liters_fuel = float(input())
  3. day_of_week = input()
  4.  
  5. liters_fuel_price = 2.10
  6. tour_guide_price = 100
  7. total = tour_guide_price + liters_fuel * liters_fuel_price
  8.  
  9. if day_of_week == 'Saturday':
  10.     total *= 0.9
  11. elif day_of_week == 'Sunday':
  12.     total *= 0.8
  13.  
  14. diff = abs(budget - total)
  15.  
  16. if budget >= total:
  17.     print(f'Safari time! Money left: {diff:.2f} lv.')
  18. else:
  19.     print(f'Not enough money! Money needed: {diff:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement