Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- зад 1
- teatur=input()
- rows=int(input())
- columns=int(input())
- capacity=rows*columns
- money=0
- if teatur=="Premiere":
- money=12
- elif teatur=="Normal":
- money=7.50
- elif teatur=="Discount":
- money=5
- total_sum=capacity * money
- print(f"{total_sum:.2f} leva")
- зад 2
- degrees=int(input())
- time_of_day=input()
- outfit=0
- shoes=0
- if degrees<=18:
- if time_of_day=="Morning":
- outfit="Sweatshirt"
- shoes="Sneakers"
- else:
- outfit="Shirt"
- shoes="Moccasins"
- elif degrees<=24:
- if time_of_day=="Afternoon":
- outfit="T-Shirt"
- shoes="Sandals"
- else:
- outfit="Shirt"
- shoes="Moccasins"
- else:
- if time_of_day=="Afternoon":
- outfit="Swim Suit"
- shoes="Barefoot"
- else:
- outfit="Shirt"
- shoes="Moccasins"
- print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
- зад 3
- elif flower_type=="Dahlias":
- price=3.80*flower_count
- if flower_count>90:
- price*=0.85
- elif flower_type=="Tulips":
- price = 2.80*flower_count
- if flower_count>80:
- price*=0.85
- elif flower_type=="Narcissus":
- price=3*flower_count
- if flower_count < 120:
- price*=1.15
- elif flower_type=="Gladiolus":
- price = 2.50*flower_count
- if flower_count<80:
- price*=1.2
- if budget>=price:
- print(f"Hey, you have a great garden with {flower_count} {flower_type} and {budget - price:.2f} leva left.")
- else:
- print(f"Not enough money, you need {price - budget:.2f} leva more.")
- зад 4
- budget=int(input())
- season=input()
- num_friends=int(input())
- if season=="Spring":
- base_price=3000
- elif season=="Summer" or season == "Autumn":
- base_price=4200
- else:
- base_price=2600
- if num_friends<=6:
- discount=0.1
- elif num_friends<=11:
- discount=0.15
- else:
- discount=0.25
- total_price=base_price * (1 - discount)
- if num_friends % 2 == 0:
- if season=="Autumn":
- total_price=total_price
- else:
- total_price*=0.95
- if budget>=total_price:
- print(f"Yes! You have {budget - total_price:.2f} leva left.")
- else:
- print(f"Not enough money! You need {total_price - budget:.2f} leva.")
- зад 5
- budget=int(input())
- season=input()
- num_friends=int(input())
- if season=="Spring":
- base_price=3000
- elif season=="Summer" or season == "Autumn":
- base_price=4200
- else:
- base_price=2600
- if num_friends<=6:
- discount=0.1
- elif num_friends<=11:
- discount=0.15
- else:
- discount=0.25
- total_price=base_price*(1 - discount)
- if num_friends % 2 == 0:
- if season=="Autumn":
- total_price=total_price
- else:
- total_price*=0.95
- if budget>=total_price:
- print(f"Yes! You have {budget - total_price:.2f} leva left.")
- else:
- print(f"Not enough money! You need {total_price - budget:.2f} leva.")
- зад 6
- budget = float(input("Enter your budget: "))
- season = input("Enter the season (summer/winter): ")
- destination = "0"
- vacation_type = "0"
- spent_money = 0
- if budget <= 100:
- destination = "Bulgaria"
- if season == "summer":
- vacation_type = "Camp"
- spent_money = budget * 0.3
- elif season == "winter":
- vacation_type = "Hotel"
- spent_money = budget * 0.7
- elif budget <= 1000:
- destination = "Balkans"
- if season == "summer":
- vacation_type = "Camp"
- spent_money = budget * 0.4
- elif season == "winter":
- vacation_type = "Hotel"
- spent_money = budget * 0.8
- else:
- destination = "Europe"
- vacation_type = "Hotel"
- spent_money = budget * 0.9
- print(f"Somewhere in {destination}")
- print(f"{vacation_type} - {spent_money:.2f}")
- зад 7
- N1=int(input())
- N2=int(input())
- operator=input()
- if operator=='+':
- result=N1 + N2
- if result % 2 == 0:
- print(f"{N1} {operator} {N2}={result} - even")
- else:
- print(f"{N1} {operator} {N2}={result} - odd")
- elif operator=='-':
- result = N1 - N2
- if result % 2 == 0:
- print(f"{N1} {operator} {N2}={result} - even")
- else:
- print(f"{N1} {operator} {N2}={result} - odd")
- elif operator=='*':
- result=N1*N2
- if result % 2 == 0:
- print(f"{N1} {operator} {N2}={result} - even")
- else:
- print(f"{N1} {operator} {N2}={result} - odd")
- elif operator=='/':
- if N2==0:
- print(f"Cannot divide {N1} by zero")
- else:
- result=N1 / N2
- print(f"{N1} / {N2} = {result:.2f}")
- elif operator=='%':
- if N2==0:
- print(f"Cannot divide {N1} by zero")
- else:
- result=N1 % N2
- print(f"{N1} % {N2}={result}")
- зад 8
- господине 8 ма задача не я разбирам мисля че имам представа как трябва да се направи но не съм сигурен
- зад 9
- days= int(input())
- room_type= input()
- rating= input()
- discount= 0
- nights=days - 1
- if room_type== "room for one person":
- price= 180.00 * nights
- discount= 0
- elif room_type== "apartment":
- price= 250.00 * nights
- if nights< 10:
- discount= 0.3
- elif 10<= nights<= 15:
- discount= 0.35
- else:
- discount= 0.5
- elif room_type== "president apartment":
- price=350.00 * nights
- if nights<10:
- discount= 0.1
- elif 10<= nights<=15:
- discount=0.15
- else:
- discount=0.2
- price_after_discount = price-(price * discount)
- if rating== "positive":
- final_price= price_after_discount+price_after_discount * 0.25
- else:
- final_price= price_after_discount - price_after_discount * 0.1
- print(f"{final_price:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement