Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #зад. 2
- points=int(input("Въведете точки: "))
- bonus=0
- if points <= 100:
- bonus+= 5
- elif points>100 and points <= 1000:
- bonus+= points * 0.2
- else:
- bonus += points * 0.1
- if points % 2 == 0:
- bonus+= 1
- elif points % 10 == 5:
- bonus+= 2
- print(bonus)
- print(points +bonus)
- #зад. 3
- start_time_hours=int(input("Въведете колко часа е"))
- start_time_minutes=int(input("Въведете колко минути е "))
- end_minutes= start_time_minutes + 15
- if end_minutes> 59:
- start_time_hours += 1
- end_minutes -= 60
- if start_time_hours> 23:
- start_time_hours=0
- print(f"{start_time_hours:02d}:{end_minutes:02d}")
- #зад. 4
- trip_price=float(input("Въведете цената на екскурзията: "))
- biscuit_cake_number=int(input("Въведете броя на бисквитените торти: "))
- skalichki_number=int(input("Въъведете броя на скаличките: "))
- chocolate_cake_number=int(input("Въвведете броя на парчетата шоколадовите торти: "))
- red_cadife_cake_number=int(input("Въведете брой парчета торта червено кадифе"))
- еclers_number=int(input("Въведете брой еклери:"))
- biscuit_cake=2.60
- skalichka=3.00
- chocolate_cake=4.10
- red_cadife_cake=8.20
- ecler=2.00
- biscuit_cake_price=biscuit_cake_number*biscuit_cake
- skalichka_price=skalichki_number*skalichka
- chocolate_cake_price=chocolate_cake_number*chocolate_cake
- red_cadife_price=red_cadife_cake_number*red_cadife_cake
- ecler_price=еclers_number*ecler
- order_price=biscuit_cake_number*biscuit_cake+skalichki_number*skalichka+chocolate_cake_number*chocolate_cake+red_cadife_cake_number*red_cadife_cake+еclers_number*ecler
- order_numbers=trip_price+biscuit_cake_number+skalichki_number+chocolate_cake_number+red_cadife_cake_number+еclers_number
- if order_numbers > 50:
- order_price *= 0.75
- comission = order_price * 0.10
- order_price -= comission
- if order_price >= trip_price:
- print(f"Yes! {order_price - trip_price:.2f} lv left.")
- else:
- print(f"Not enough money! {trip_price - order_price:.2f} lv needed.")
- #зад. 5
- match_budget=float(input(("Въведете бюджета за мача:")))
- staff_number=int(input("Въведете броят на персонала:"))
- staff_uniform_price_per_person=float(input("Въведете цена за облекло на един човек от персонала"))
- decor = match_budget*0.10
- if staff_number>150:
- staff_uniform_price_per_person * 0.90
- total_uniform_price=staff_uniform_price_per_person*staff_number
- total_match_expencess=decor+total_uniform_price
- if total_match_expencess > match_budget:
- print("Not enough money!")
- print(f"Wingard needs {total_match_expencess - match_budget:.2f} leva more.")
- else:
- print("Action!")
- print(f"Wingard starts filming with {match_budget - total_match_expencess:.2f} leva left.")
- #зад. 6
- record=float(input("Въведете рекорд:"))
- distance=float(input("Въведете разстояние: "))
- time_per_meter=float(input("Въведете време в секунди за спускане на 1 метър: "))
- total_time=distance*time_per_meter
- zabavqne=(distance//15)*12.5
- total_time += zabavqne
- if total_time<record:
- print(f"Yes, she succeeded! The new world record is {total_time:.2f} seconds.")
- else:
- print(f"No, she failed! She was {total_time - record:.2f} seconds slower.")
- #зад. 7
- gosho_budget=float(input("Гоше, къв ти е бюджета?"))
- video_cards_number=int(input("Гоше, колко видео карти?"))
- proccesors_number=int(input("Гоше, колко процесора?"))
- ram_number=int(input("Гоше колко рам искаш?"))
- video_card_price=250
- video_cards_espenses=video_cards_number*video_card_price
- proccesor_price=video_cards_espenses*0.35
- ram_price=video_cards_espenses*0.10
- proccesors_expenses=proccesors_number*proccesor_price
- ram_expenses=ram_number*ram_price
- all_expenses=proccesors_expenses+ram_expenses+video_cards_espenses
- if gosho_budget >= all_expenses:
- print(f"You have {gosho_budget - all_expenses} leva left!")
- else:
- print(f"Not enough money! You need {all_expenses - gosho_budget:.2f} leva more!")
- #зад. 8
- import math
- tutorial_name=input("Въведете името на клипа")
- video_duration=int(input("Въведете продължителността на видеото: "))
- break_duration=int(input("Въведете продължителността на почивката: "))
- eating_time=break_duration/8
- break_time=break_duration/4
- all_free_time=break_duration-eating_time-break_time
- if all_free_time >=video_duration:
- left_time= math.ceil(all_free_time - video_duration)
- print(f"You have enough time to watch {tutorial_name} and left with {left_time} minutes free time.")
- else:
- nujno_vreme= math.ceil(video_duration - all_free_time)
- print(f"You don't have enough time to watch {tutorial_name}, you need {nujno_vreme} more minutes.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement