Advertisement
Dimitar23308

Untitled

Nov 4th, 2023 (edited)
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.13 KB | None | 0 0
  1. #зад. 2
  2.  
  3. points=int(input("Въведете точки: "))
  4. bonus=0
  5.  
  6.  
  7. if points <= 100:
  8.     bonus+= 5
  9. elif points>100 and points <= 1000:
  10.     bonus+= points * 0.2
  11. else:
  12.     bonus += points * 0.1
  13.  
  14.  
  15. if points % 2 == 0:
  16.     bonus+= 1
  17. elif points % 10 == 5:
  18.     bonus+= 2
  19.  
  20. print(bonus)
  21. print(points +bonus)
  22.  
  23.  
  24. #зад. 3
  25.  
  26.  
  27. start_time_hours=int(input("Въведете колко часа е"))
  28. start_time_minutes=int(input("Въведете колко минути е "))
  29.  
  30.  
  31. end_minutes= start_time_minutes + 15
  32.  
  33. if end_minutes> 59:
  34.     start_time_hours += 1
  35.     end_minutes -= 60
  36.  
  37.  
  38. if start_time_hours> 23:
  39.     start_time_hours=0
  40.  
  41.  
  42. print(f"{start_time_hours:02d}:{end_minutes:02d}")
  43.  
  44. #зад. 4
  45. trip_price=float(input("Въведете цената на екскурзията: "))
  46. biscuit_cake_number=int(input("Въведете броя на бисквитените торти: "))
  47. skalichki_number=int(input("Въъведете броя на скаличките: "))
  48. chocolate_cake_number=int(input("Въвведете броя на парчетата шоколадовите торти: "))
  49. red_cadife_cake_number=int(input("Въведете брой парчета торта червено кадифе"))
  50. еclers_number=int(input("Въведете брой еклери:"))
  51.  
  52.  
  53. biscuit_cake=2.60
  54. skalichka=3.00
  55. chocolate_cake=4.10
  56. red_cadife_cake=8.20
  57. ecler=2.00
  58.  
  59.  
  60. biscuit_cake_price=biscuit_cake_number*biscuit_cake
  61. skalichka_price=skalichki_number*skalichka
  62. chocolate_cake_price=chocolate_cake_number*chocolate_cake
  63. red_cadife_price=red_cadife_cake_number*red_cadife_cake
  64. ecler_price=еclers_number*ecler
  65.  
  66. 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
  67.  
  68. order_numbers=trip_price+biscuit_cake_number+skalichki_number+chocolate_cake_number+red_cadife_cake_number+еclers_number
  69. if order_numbers > 50:
  70.     order_price *= 0.75
  71. comission = order_price * 0.10
  72. order_price -= comission
  73.  
  74.  
  75. if order_price >= trip_price:
  76.     print(f"Yes! {order_price - trip_price:.2f} lv left.")
  77. else:
  78.     print(f"Not enough money! {trip_price - order_price:.2f} lv needed.")
  79.  
  80. #зад. 5
  81.  
  82. match_budget=float(input(("Въведете бюджета за мача:")))
  83. staff_number=int(input("Въведете броят на персонала:"))
  84. staff_uniform_price_per_person=float(input("Въведете цена за облекло на един човек от персонала"))
  85. decor = match_budget*0.10
  86. if staff_number>150:
  87.     staff_uniform_price_per_person * 0.90
  88.  
  89. total_uniform_price=staff_uniform_price_per_person*staff_number
  90. total_match_expencess=decor+total_uniform_price
  91.  
  92. if total_match_expencess > match_budget:
  93.     print("Not enough money!")
  94.     print(f"Wingard needs {total_match_expencess - match_budget:.2f} leva more.")
  95. else:
  96.     print("Action!")
  97.     print(f"Wingard starts filming with {match_budget - total_match_expencess:.2f} leva left.")
  98.  
  99.  
  100. #зад. 6
  101.  
  102. record=float(input("Въведете рекорд:"))
  103. distance=float(input("Въведете разстояние: "))
  104. time_per_meter=float(input("Въведете време в секунди за спускане на 1 метър: "))
  105.  
  106. total_time=distance*time_per_meter
  107. zabavqne=(distance//15)*12.5
  108. total_time += zabavqne
  109.  
  110.  
  111. if total_time<record:
  112.     print(f"Yes, she succeeded! The new world record is {total_time:.2f} seconds.")
  113. else:
  114.     print(f"No, she failed! She was {total_time - record:.2f} seconds slower.")
  115.  
  116. #зад. 7
  117. gosho_budget=float(input("Гоше, къв ти е бюджета?"))
  118. video_cards_number=int(input("Гоше, колко видео карти?"))
  119. proccesors_number=int(input("Гоше, колко процесора?"))
  120. ram_number=int(input("Гоше колко рам искаш?"))
  121.  
  122. video_card_price=250
  123. video_cards_espenses=video_cards_number*video_card_price
  124. proccesor_price=video_cards_espenses*0.35
  125. ram_price=video_cards_espenses*0.10
  126.  
  127. proccesors_expenses=proccesors_number*proccesor_price
  128. ram_expenses=ram_number*ram_price
  129. all_expenses=proccesors_expenses+ram_expenses+video_cards_espenses
  130.  
  131. if gosho_budget >= all_expenses:
  132.     print(f"You have {gosho_budget - all_expenses} leva left!")
  133. else:
  134.     print(f"Not enough money! You need {all_expenses - gosho_budget:.2f} leva more!")
  135.    
  136. #зад. 8
  137.  
  138. import math
  139.  
  140. tutorial_name=input("Въведете името на клипа")
  141. video_duration=int(input("Въведете продължителността на видеото: "))
  142. break_duration=int(input("Въведете продължителността на почивката: "))
  143.  
  144. eating_time=break_duration/8
  145. break_time=break_duration/4
  146. all_free_time=break_duration-eating_time-break_time
  147.  
  148. if all_free_time >=video_duration:
  149.     left_time= math.ceil(all_free_time - video_duration)
  150.     print(f"You have enough time to watch {tutorial_name} and left with {left_time} minutes free time.")
  151. else:
  152.     nujno_vreme= math.ceil(video_duration - all_free_time)
  153.     print(f"You don't have enough time to watch {tutorial_name}, you need {nujno_vreme} more minutes.")
  154.  
  155.  
  156.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement