Advertisement
veronikaaa86

03. New House

May 22nd, 2022
1,070
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type_flowers = input()
  2. count_flowers = int(input())
  3. budget = int(input())
  4.  
  5. sum = 0
  6. if type_flowers == "Roses":
  7.     sum = 5 * count_flowers
  8.     if count_flowers > 80:
  9.         sum = sum * 0.90
  10. elif type_flowers == "Dahlias":
  11.     sum = 3.80 * count_flowers
  12.     if count_flowers > 90:
  13.         sum = sum * 0.85
  14. elif type_flowers == "Tulips":
  15.     sum = 2.80 * count_flowers
  16.     if count_flowers > 80:
  17.         sum = sum * 0.85
  18. elif type_flowers == "Narcissus":
  19.     sum = 3 * count_flowers
  20.     if count_flowers < 120:
  21.         sum = sum * 1.15
  22. elif type_flowers == "Gladiolus":
  23.     sum = 2.50 * count_flowers
  24.     if count_flowers < 80:
  25.         sum = sum * 1.20
  26.  
  27. diff = abs(budget - sum)
  28. if sum <= budget:
  29.     print(f"Hey, you have a great garden with {count_flowers} {type_flowers} and {diff:.2f} leva left.")
  30. else:
  31.     print(f"Not enough money, you need {diff:.2f} leva more.")
  32.  
  33.  
  34.  
  35.  
Advertisement
RAW Paste Data Copied
Advertisement