Advertisement
Guest User

Untitled

a guest
Oct 4th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. flower = input()
  2. count = int(input())
  3. budget = int(input())
  4. price = 0
  5. final = 0
  6. if flower == "Roses":
  7. price = 5
  8. final = count * price
  9. if count > 80:
  10. final -= count * price * 0.1
  11. if 0 > (budget - final):
  12. print(f"Not enough money, you need {abs(budget - final):.2f} leva more.")
  13. if 0 < (budget - final):
  14. print(f"Hey, you have a great garden with {count} {flower} and {abs(budget - final):.2f} leva left.")
  15. if flower == "Dahlias":
  16. price = 3.8
  17. final = count * price
  18. if count > 90:
  19. final -= count * price * 0.15
  20. if 0 > (budget - final):
  21. print(f"Not enough money, you need {abs(budget - final):.2f} leva more.")
  22. if 0 < (budget - final):
  23. print(f"Hey, you have a great garden with {count} {flower} and {abs(budget - final):.2f} leva left.")
  24. if flower == "Tulips":
  25. price = 2.8
  26. final = count * price
  27. if count > 80:
  28. final -= count * price * 0.15
  29. if 0 > (budget - final):
  30. print(f"Not enough money, you need {abs(budget - final):.2f} leva more.")
  31. if 0 < (budget - final):
  32. print(f"Hey, you have a great garden with {count} {flower} and {abs(budget - final):.2f} leva left.")
  33. if flower == "Narcissus":
  34. price = 3
  35. final = count * price
  36. if count < 120:
  37. final += count * price * 0.15
  38. if 0 > (budget - final):
  39. print(f"Not enough money, you need {abs(budget - final):.2f} leva more.")
  40. if 0 < (budget - final):
  41. print(f"Hey, you have a great garden with {count} {flower} and {abs(budget - final):.2f} leva left.")
  42. if flower == "Gladiolus":
  43. price = 2.5
  44. final = count * price
  45. if count < 80:
  46. final += count * price * 0.2
  47. if 0 > (budget - final):
  48. print(f"Not enough money, you need {abs(budget - final):.2f} leva more.")
  49. if 0 < (budget - final):
  50. print(f"Hey, you have a great garden with {count} {flower} and {abs(budget - final):.2f} leva left.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement