Teo_Yanchev

safari_2-3-2019_exam

Jul 15th, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. budget = float(input())
  2. fuel = float(input())
  3. day = input()
  4.  
  5. fuel_price = fuel * 2.10
  6. guide = 100 + fuel_price
  7.  
  8. if day == "Saturday":
  9. guide *= 0.90
  10. else:
  11. guide *= 0.80
  12.  
  13. diff = abs(budget - guide)
  14. if budget > guide:
  15. print(f"Safari time! Money left: {diff:.2f} lv.")
  16. else:
  17. print(f"Not enough money! Money needed: {diff:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment