Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 01. Cinema
- type_tickets = input()
- rows = int(input())
- cols = int(input())
- all_seats = rows * cols
- price = 0
- if type_tickets == "Premiere":
- price = 12
- elif type_tickets == "Normal":
- price = 7.5
- elif type_tickets == "Discount":
- price = 5
- sum = price * all_seats
- print(f"{sum:.2f} leva")
- ================================================
- 02. Summer Outfit
- degrees = int(input())
- time_of_day = input()
- outfit = ""
- shoes = ""
- if time_of_day == "Morning":
- if degrees >= 10 and degrees <= 18:
- outfit = "Sweatshirt"
- shoes = "Sneakers"
- elif degrees > 18 and degrees <= 24:
- outfit = "Shirt"
- shoes = "Moccasins"
- elif degrees > 24:
- outfit = "T-Shirt"
- shoes = "Sandals"
- elif time_of_day == "Afternoon":
- if degrees >= 10 and degrees <= 18:
- outfit = "Shirt"
- shoes = "Moccasins"
- elif degrees > 18 and degrees <= 24:
- outfit = "T-Shirt"
- shoes = "Sandals"
- elif degrees > 24:
- outfit = "Swim Suit"
- shoes = "Barefoot"
- elif time_of_day == "Evening":
- if degrees >= 10 and degrees <= 18:
- outfit = "Shirt"
- shoes = "Moccasins"
- elif degrees > 18 and degrees <= 24:
- outfit = "Shirt"
- shoes = "Moccasins"
- elif degrees > 24:
- outfit = "Shirt"
- shoes = "Moccasins"
- print(f"It's {degrees} degrees, get your {outfit} and {shoes}.")
- ================================================================
- 03. New House
- type_flower = input()
- count_flowers = int(input())
- budget = int(input())
- sum = 0
- if type_flower == "Roses":
- sum = 5 * count_flowers
- if count_flowers > 80:
- sum = sum * 0.90
- elif type_flower == "Dahlias":
- sum = 3.80 * count_flowers
- if count_flowers > 90:
- sum = sum * 0.85
- elif type_flower == "Tulips":
- sum = 2.80 * count_flowers
- if count_flowers > 80:
- sum = sum * 0.85
- elif type_flower == "Narcissus":
- sum = 3 * count_flowers
- if count_flowers < 120:
- sum = sum * 1.15
- elif type_flower == "Gladiolus":
- sum = 2.5 * count_flowers
- if count_flowers < 80:
- sum = sum * 1.20
- diff = abs(budget - sum)
- if budget >= sum:
- print(f"Hey, you have a great garden with {count_flowers} {type_flower} and {diff:.2f} leva left.")
- else:
- print(f"Not enough money, you need {diff:.2f} leva more.")
- ================================================================
- 04. Fishing Boat
- budget = int(input())
- season = input()
- count_people = int(input())
- price_boat = 0
- if season == "Spring":
- price_boat = 3000
- elif season == "Summer" or season == "Autumn":
- price_boat = 4200
- elif season == "Winter":
- price_boat = 2600
- if count_people <= 6:
- price_boat = price_boat * 0.90
- elif count_people <= 11:
- price_boat = price_boat * 0.85
- elif count_people > 11:
- price_boat = price_boat * 0.75
- if count_people % 2 == 0:
- if season != "Autumn":
- price_boat = price_boat * 0.95
- diff = abs(budget - price_boat)
- if budget >= price_boat:
- print(f"Yes! You have {diff:.2f} leva left.")
- else:
- print(f"Not enough money! You need {diff:.2f} leva.")
- ================================================================
- 05. Journey
- budget = float(input())
- season = input()
- destination = ""
- place = ""
- expenses = 0
- if budget <= 100:
- destination = "Bulgaria"
- if season == "summer":
- place = "Camp"
- expenses = budget * 0.3
- elif season == "winter":
- place = "Hotel"
- expenses = budget * 0.7
- elif budget <= 1000:
- destination = "Balkans"
- if season == "summer":
- place = "Camp"
- expenses = budget * 0.4
- elif season == "winter":
- place = "Hotel"
- expenses = budget * 0.8
- elif budget > 1000:
- destination = "Europe"
- place = "Hotel"
- expenses = budget * 0.9
- print(f"Somewhere in {destination}")
- print(f"{place} - {expenses:.2f}")
- ================================================================
- 06. Operations Between Numbers
- n1 = int(input())
- n2 = int(input())
- operator = input()
- result = 0
- if operator == "+":
- result = n1+n2
- if result % 2 == 0:
- print(f'{n1} {operator} {n2} = {result:.0f} - even')
- else:
- print(f'{n1} {operator} {n2} = {result:.0f} - odd')
- elif operator == "-":
- result = n1-n2
- if result % 2 == 0:
- print(f'{n1} {operator} {n2} = {result:.0f} - even')
- else:
- print(f'{n1} {operator} {n2} = {result:.0f} - odd')
- if operator == "*":
- result = n1*n2
- if result % 2 == 0:
- print(f'{n1} {operator} {n2} = {result:.0f} - even')
- else:
- print(f'{n1} {operator} {n2} = {result:.0f} - odd')
- elif operator == "/" and n2 != 0:
- result = n1/n2
- print(f'{n1} {operator} {n2} = {result:.2f}')
- elif operator == "%" and n2 != 0:
- result = n1%n2
- print(f'{n1} {operator} {n2} = {result:.0f}')
- elif n2 == 0 and operator == '/' or n2 == 0 and operator == '%':
- print(f"Cannot divide {n1} by zero")
- ================================================================
- 07. Hotel Room
- month = input()
- nightsCount = int(input())
- apartmentPrice = 0
- studioPrice = 0
- if month == "May" or month == "October":
- apartmentPrice = nightsCount * 65
- studioPrice = nightsCount * 50
- elif month == "June" or month == "September":
- apartmentPrice = nightsCount * 68.70
- studioPrice = nightsCount * 75.20
- elif month == "July" or month == "August":
- apartmentPrice = nightsCount * 77
- studioPrice = nightsCount * 76
- if nightsCount > 14 and (month == "May" or month == "October"):
- studioPrice *= 0.70
- elif nightsCount > 7 and (month == "May" or month == "October"):
- studioPrice *= 0.95
- elif nightsCount > 14 and (month == "June" or month == "September"):
- studioPrice *= 0.80
- if nightsCount > 14:
- apartmentPrice *= 0.90
- print(f"Apartment: {apartmentPrice:.2f} lv.")
- print(f"Studio: {studioPrice:.2f} lv.")
- ================================================================
- 08. On Time for the Exam
- exam_hour = int(input())
- exam_min = int(input())
- hour_of_arrival = int(input())
- min_of_arrival = int(input())
- # 10:00 - 10:00
- # 600 - 600 = 0
- exam_time_min = (exam_hour * 60) + exam_min
- arrival_time_min = (hour_of_arrival * 60) + min_of_arrival
- diff_min = abs(exam_time_min - arrival_time_min)
- if exam_time_min < arrival_time_min:
- print("Late")
- if diff_min >= 60:
- hour = diff_min // 60
- minutes = diff_min % 60
- if minutes < 10:
- print(f"{hour}:0{minutes} hours after the start")
- else:
- print(f"{hour}:{minutes} hours after the start")
- else:
- print(f"{diff_min} minutes after the start")
- elif exam_time_min == arrival_time_min or diff_min <= 30:
- print("On time")
- if diff_min >= 1 and diff_min <= 30:
- print(f"{diff_min} minutes before the start")
- else:
- print("Early")
- if diff_min >= 60:
- hour = diff_min // 60
- minutes = diff_min % 60
- if minutes < 10:
- print(f"{hour}:0{minutes} hours before the start")
- else:
- print(f"{hour}:{minutes} hours before the start")
- else:
- print(f"{diff_min} minutes before the start")
- ================================================================
- 09. Ski Trip
- ays = int(input())
- room = input()
- assessment = input()
- price = 0
- if room == 'room for one person':
- price = (days - 1) * 18
- elif room == 'apartment':
- if days < 10:
- price = (days - 1) * 25 * 0.7
- elif 10 <= days <= 15:
- price = (days - 1) * 25 * 0.65
- else:
- price = (days - 1) * 25 * 0.5
- else:
- if days < 10:
- price = (days - 1) * 35 * 0.9
- elif 10 <= days <= 15:
- price = (days - 1) * 35 * 0.85
- else:
- price = (days - 1) * 35 * 0.8
- if assessment == 'positive':
- price *= 1.25
- else:
- price *= 0.9
- print(f'{price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement