# new_house

May 1st, 2021
729
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. kind_of_flowers = input()   # "Roses", "Dahlias", "Tulips", "Narcissus" или "Gladiolus";
2. qty_of_flowers = int(input())
3. budget = int(input())
4.
5. price_for_all_flowers = 0
6.
7. roses_price = 5
8. dahlias_price = 3.80
9. tulips_price = 2.80
10. narcissus_price = 3
12.
13. if kind_of_flowers == "Roses" and qty_of_flowers > 80:
14.     price_for_all_flowers = qty_of_flowers * roses_price * 0.9
15.     if budget > price_for_all_flowers:
16.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
17.     else:
18.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
19. elif kind_of_flowers == "Roses" and qty_of_flowers <= 80:
20.     price_for_all_flowers = qty_of_flowers * roses_price
21.     if budget > price_for_all_flowers:
22.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
23.     else:
24.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
25.
26.
27. if kind_of_flowers == "Dahlias" and qty_of_flowers > 90:
28.     price_for_all_flowers = qty_of_flowers * dahlias_price * 0.85
29.     if budget > price_for_all_flowers:
30.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
31.     else:
32.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
33. elif kind_of_flowers == "Dahlias" and qty_of_flowers <= 90:
34.     price_for_all_flowers = qty_of_flowers * dahlias_price
35.     if budget > price_for_all_flowers:
36.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
37.     else:
38.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
39.
40.
41. if kind_of_flowers == "Tulips" and qty_of_flowers > 80:
42.     price_for_all_flowers = qty_of_flowers * tulips_price * 0.85
43.     if budget > price_for_all_flowers:
44.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
45.     else:
46.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
47. elif kind_of_flowers == "Tulips" and qty_of_flowers <= 80:
48.     price_for_all_flowers = qty_of_flowers * tulips_price
49.     if budget > price_for_all_flowers:
50.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
51.     else:
52.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
53.
54.
55. if kind_of_flowers == "Narcissus" and qty_of_flowers >= 120:
56.     price_for_all_flowers = qty_of_flowers * narcissus_price
57.     if budget > price_for_all_flowers:
58.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
59.     else:
60.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
61. elif kind_of_flowers == "Narcissus" and qty_of_flowers < 120:
62.     price_for_all_flowers = qty_of_flowers * narcissus_price * 1.15
63.     if budget > price_for_all_flowers:
64.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
65.     else:
66.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
67.
68.
69. if kind_of_flowers == "Gladiolus" and qty_of_flowers >= 80:
70.     price_for_all_flowers = qty_of_flowers * gladiolus_price
71.     if budget > price_for_all_flowers:
72.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
73.     else:
74.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
75. elif kind_of_flowers == "Gladiolus" and qty_of_flowers < 80:
76.     price_for_all_flowers = qty_of_flowers * gladiolus_price * 1.2
77.     if budget > price_for_all_flowers:
78.         print(f"Hey, you have a great garden with {qty_of_flowers} {kind_of_flowers} and {abs(budget - price_for_all_flowers ):.2f} leva left.")
79.     else:
80.         print(f"Not enough money, you need {abs(budget - price_for_all_flowers ):.2f} leva more.")
RAW Paste Data