Advertisement
bl00dt3ars

03. New House

Oct 25th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.70 KB | None | 0 0
  1. flowers = input()
  2. number = int(input())
  3. budget = int(input())
  4. costs = number
  5.  
  6. if flowers == "Roses":
  7.     costs *= 5
  8.     if number > 80:
  9.         costs *= 0.9
  10. elif flowers == "Dahlias":
  11.     costs *= 3.80
  12.     if number > 90:
  13.         costs *= 0.85
  14. elif flowers == "Tulips":
  15.     costs *= 2.80
  16.     if number > 80:
  17.         costs *= 0.85
  18. elif flowers == "Narcissus":
  19.     costs *= 3
  20.     if number < 120:
  21.         costs *= 1.15
  22. else:
  23.     costs *= 2.50
  24.     if number < 80:
  25.         costs *= 1.2
  26.  
  27. if budget >= costs:
  28.     print(f"Hey, you have a great garden with {number} {flowers} and {budget - costs:.2f} leva left.")
  29. else:
  30.     print(f"Not enough money, you need {costs - budget:.2f} leva more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement