Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1/10/23
- заадача 1 :
- usd=float(input("Въведете сумата, която искате да .пресметнете: "))
- bgn=usd*1.79549
- print(bgn)
- задача 2:
- from math import pi
- from math import floor
- radians = float(input("Enter radians: "))
- degrees = radians*180 /pi
- print(floor(degrees))
- !задача 3:
- deposit_sum=float(input("Please enter depsoit sum"))
- month_of_deposit=int(input("Please enter mount of deposit"))
- year_percent=float(input("Please enter year percecnt"))
- total_sum = deposit_sum + ((deposit_sum*year_percent)/12)
- print(f"total_sum {int(total_sum):.2f}")
- задача 4:
- all_hours_reading=int(input("Въведете общ брой страници"))
- pages_per_hour=int(input("Въвеедете колко страници биват прочетени за час"))
- days_left=int(input("Въведете дните, за които трябва да бъде прочетена книгата"))
- hours_should_read=all_hours_reading/(pages_per_hour*days_left)
- print(int(hours_should_read))
- задача 5
- number_of_pens = int(input("Брой пакети химикали: "))
- number_markers = int(input("Брой пакети маркери: "))
- liters_detergent = int(input("Литри препарат за почистване на дъска: "))
- percent_reduction = int(input("Процент намаление: "))
- packet_of_pens=5.80
- packet_of_markers = 7.20
- preparat=1.20
- total_pens = number_of_pens * packet_of_pens
- total_markers = number_markers * packet_of_markers
- total_preparat = liters_detergent * preparat
- total_cost = total_pens + total_markers + total_preparat
- total_cost_after_reduction=total_cost - (total_cost * (percent_reduction / 100))
- print(float(total_cost_after_reduction))
- !задача 6: господине 6 - тази задача не мога да разбера формулите по които да изчислява, пиша формули които са верни според мен, но със примерните входове не излиза общия разход
- ето задачата но има нещо грешно, което не мога да усмисля:
- zad 6
- nylon_square_meters=int(input("Въведете необходимо количество найлон (в кв.м.): "))
- paint_liters=int(input("Въведете необходимо количество боя (в литри) "))
- razreditel_liters=int(input("Въведете количество разредител (в литри)"))
- hours_of_work=int(input("Въведете часовете, за които майсторите ще свършат работата: "))
- nylon_price_per_square_meter = 1.50
- paint_price_per_liter = 14.50
- thinner_price_per_liter = 5.00
- bag_price = 0.40
- total_nylon_cost = nylon_square_meters * nylon_price_per_square_meter + (0.10*nylon_square_meters) + 2
- total_paint_cost = paint_liters * paint_price_per_liter
- total_razreditel_cost = razreditel_liters * thinner_price_per_liter
- total_bag_cost = 0.40
- total_materials_cost = total_nylon_cost + total_paint_cost + total_razreditel_cost + total_bag_cost
- total_labor_cost = 0.30 * (total_bag_cost+total_materials_cost)
- total_cost = total_materials_cost + total_labor_cost
- print(f"Сумата на всички разходи е: {total_cost:.2f} лв.")
- !задача 7
- chicken_menu_number=int(input("Въведете брой пилешки менюта: "))
- fish_menu_number=int(input("Въведете врой рибени менюта" ))
- vegitarian_number=int(input("Въведете брой вегетариански менюта"))
- chicken_menu_price=10.35
- fish_menu_price=12.40
- vegetarian_menu_prce=8.15
- total_chicken_menu_cost=chicken_menu_number*chicken_menu_price
- total_fish_menu_cost=fish_menu_number*fish_menu_price
- total_vegetarian_menu_cost=vegitarian_number*vegetarian_menu_prce
- total_cost_without_dilivery=0.20*(total_chicken_menu_cost+total_fish_menu_cost+total_vegetarian_menu_cost)
- total_cost_with_delivary=0.20*(total_chicken_menu_cost+total_fish_menu_cost+total_vegetarian_menu_cost)+2.50
- print(f"Сумата на всички разходи е: {total_cost_with_delivary:.2f} лв.")
- !задача 8
- year_price=float(input("Въведете годишна такса за тренировки"))
- shoes_price = year_price * 0.6
- uniform_price = shoes_price * 0.8
- ball_price = uniform_price / 4
- accessories_price = ball_price / 5
- total_cost = shoes_price + uniform_price + ball_price + accessories_price
- print(f"Pesho has need {total_cost:.2f} leva for training!")
- зад 9
- length = int(input())
- width = int(input())
- height = int(input())
- percentage = float(input())
- volume = (length/10) * (width/10) * (height/10)
- liters_water = volume * (1 - percentage / 100)
- print(liters_water)
- Oct 17 2023
- задача 4 та
- grade = float(input("Моля, въведете оценката: "))
- if 2.00 <= grade < 3.00:
- print("Слаб")
- elif 3.00 <= grade < 3.50:
- print("Среден")
- elif 3.50 <= grade < 4.50:
- print("Добър")
- elif 4.50 <= grade < 5.50:
- print("Много добър.")
- elif 5.50 <= grade <= 6.00:
- print("Отличен.")
- else:
- print("Невалидна оценка ")
- Задача 5 та
- winning_number = 7
- guess = int(input("Опитайте да познаете числото: "))
- if guess < winning_number:
- print("Числото е по-малко.")
- elif guess > winning_number:
- print("Числото е по-голямо.")
- else:
- print("Браво! Познахте числото.")
- задача 6 та
- speed = float(input("Въведете скоростта на Стамат: "))
- if speed <= 15:
- print("slow")
- elif speed <= 55:
- print("average")
- elif speed <= 100:
- print("fast")
- elif speed <= 150:
- print("ultra fast")
- else:
- print("extremely fast")
- зад 7
- import math
- figure_type = input("Въведете вида на фигурата (square, rectangle, circle, triangle): ")
- if figure_type == "square":
- side = float(input("Въведете дължината на страната на квадрата: "))
- area = round(side ** 2, 4)
- elif figure_type == "rectangle":
- side1 = float(input("Въведете дължината на едната страна на правоъгълника: "))
- side2 = float(input("Въведете дължината на другата страна на правоъгълника: "))
- area = round(side1 * side2, 4)
- elif figure_type == "circle":
- radius = float(input("Въведете радиуса на кръга: "))
- area = round(math.pi * (radius ** 2), 4)
- elif figure_type == "triangle":
- side = float(input("Въведете дължината на страната на триъгълника: "))
- height = float(input("Въведете дължината на височината към нея: "))
- area = round((side * height) / 2, 4)
- else:
- print("Невалиден тип фигура.")
- exit(0)
- print(f"Лицето на фигурата е: {area}")
- Oct 23/23
- #зад. 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.")
- Nov 8/23
- зад.1
- number = int(input())
- if number == 1:
- print("Monday")
- elif number==2:
- print("Tuesday")
- elif number==3:
- print("Wednesday")
- elif number==4:
- print("Thursday")
- elif number==5:
- print("Friday")
- elif number==6:
- print("Saturday")
- elif number==7:
- print("Sunday")
- else:
- print("Wrong number!")
- зад.2
- day=input("Въведете ден:")
- if day == "Monday":
- print("Study day")
- elif day == "Tuesday":
- print("Study day")
- elif day == "Wednesday":
- print("Study day")
- elif day == "Thursday":
- print("Study day")
- elif day == "Friday":
- print("Study day")
- elif day == "Saturday":
- print("Weekend")
- elif day == "Sunday":
- print("Weekend")
- else:
- print("Wrong day")
- зад.3
- student_number = input("Enter a student number: ")
- if student.startswith("23"):
- print("I-ви курс")
- elif student.startswith("22"):
- print("II-ри курс")
- elif student.startswith("21"):
- print("III-ти курс")
- elif student.startswith("20"):
- print("IV-ти курс")
- elif student.startswith("19"):
- print("V-ти курс")
- else:
- print("There is no such student number!")
- зад.4
- age=float(input("въведете възраст "))
- gender=input("Моля въведете пол m или f: ")
- if gender=="m":
- if age>=16:
- print("Mr.")
- else:
- print("Master")
- elif gender=="f":
- if age>=16:
- print("Ms.")
- else:
- print("Miss")
- else:
- print("Невалиден вход!")
- зад.5
- place=input(("input place"))
- product=input(("Input product"))
- quantity=float(input("enter quantity "))
- if place=="School":
- if product.lower()=="coffee":
- print(quantity * 0.50)
- elif product.lower()=="water":
- print(quantity * 0.80)
- elif product.lower()=="beer":
- print(f"{(quantity * 1.20):.1f}")
- elif product.lower()=="sweets":
- print(f"{(quantity * 1.45):.1f}")
- elif product.lower()=="peanuts":
- print(quantity * 1.60)
- else:
- print("There is no such product!")
- elif place=="Dormitory":
- if product.lower()=="coffee":
- print(quantity * 0.40)
- elif product.lower()=="water":
- print(quantity * 0.70)
- elif product.lower()=="beer":
- print(quantity * 1.15)
- elif product.lower()=="sweets":
- print(quantity * 1.30)
- elif product.lower()=="peanuts":
- print(quantity * 1.50)
- else:
- print("There is no such product!")
- elif place=="Bus-station":
- if product.lower()=="coffee":
- print(quantity * 0.45)
- elif product.lower()=="water":
- print(quantity * 0.70)
- elif product.lower()=="beer":
- print(quantity * 1.10)
- elif product.lower()=="sweets":
- print(quantity * 1.35)
- elif product.lower()=="peanuts":
- print(quantity * 1.55)
- else:
- print("There is no such product!")
- else:
- print("Wrong")
- зад.6
- number=int(input("въведете число: "))
- if -100<=number<=100:
- if number== -1 or number==0 or number==1:
- print("No")
- else:
- print("Yes")
- else:
- print("No")
- зад.7
- hour=int(input("Въведи час "))
- day=input("Въведи ден ")
- if day.lower() == "Неделя":
- print("Затворено")
- elif hour>=13 and hour<15:
- print("Затворено")
- elif hour>=7 and hour<17:
- print("Отворено")
- else:
- print("Затворено")
- зад.8
- day = input("Въведете ден от седмицата: ")
- if day=="Monday" or day=="Tuesday" or day=="Friday":
- print("12leva")
- elif day=="Wednesday" or day=="Thursday":
- print("14leva")
- elif day=="Saturday" or day == "Sunday":
- print("16leva")
- else:
- print("Невалиден ден")
- зад. 9
- product=input("Въведете продукт: ")
- if product=="banana" or product=="apple" or product=="kiwi" or product=="cherry" or product=="lemon" or product=="grapes":
- print("fruit")
- elif product=="tomato" or product=="cucumber" or product=="pepper" or product=="carrot":
- print("vegetable")
- else:
- print("unknown")
- зад.10
- number=int(input("Въведете число: "))
- if 100>number or number>200 or number%2==0:
- print("Invalid number")
- else:
- print("Valid number")
- зад.11
- fruit=input("Въведете плод: ")
- day=input("ден от седмицата: ")
- quantity=float(input("Въведете количество: "))
- price=0
- if day=='Monday' or day=='Tuesday' or day == 'Wednesday' or day=='Thursday' or day== 'Friday':
- if fruit=='banana':
- price=2.50
- elif fruit=='apple':
- price=1.20
- elif fruit=='orange':
- price=0.85
- elif fruit=='grapefruit':
- price=1.45
- elif fruit=='kiwi':
- price=2.70
- elif fruit=='pineapple':
- price=5.50
- elif fruit=='grapes':
- price=3.85
- elif day=='Saturday' or day=='Sunday':
- if fruit=='banana':
- price=2.70
- elif fruit=='apple':
- price=1.25
- elif fruit=='orange':
- price=0.90
- elif fruit=='grapefruit':
- price=1.60
- elif fruit=='kiwi':
- price=3.00
- elif fruit=='pineapple':
- price=5.60
- elif fruit=='grapes':
- price=4.20
- if price == 0:
- print('error')
- else:
- total = price * quantity
- print(f"{total:.2f}")
- зад. 12 господине не можах да я направя, ако я разбера ще ви я пратя. Данните от таблицата не ги разбирам.
- Nov 13/23
- зад 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}")
- Nov 21
- зад 1
- for n in range(1, 10+1):
- print(n)
- зад 2
- for n in range(1, 101):
- print(n)
- зад 3
- for n in range(100,201):
- print(n)
- зад 4
- num = int(input("Enter a number: "))
- for n in range(0, num+1):
- print(n)
- зад 5
- num = int(input("enter a number:"))
- for i in range(0,num+1,5):
- print(i)num = int(input("enter a number:"))
- for i in range(0,num+1,5):
- print(i)
- зад 6
- number = int(input())
- for num in range(number):
- print(num**num)
- зад 7
- number = int(input())
- number2 = int(input())
- for num in range(number, number2 - 1, -1):
- print(num)
- зад 8
- text = input()
- for i in text:
- # print(f":", end="")
- # print(i, end="")
- print(i, end=":")
- зад 9
- text = input()
- total_sum = 0
- for t in text:
- if t.lower() == "a":
- total_sum += 1
- elif t.lower() == "e":
- total_sum += 2
- elif t.lower() == "i":
- total_sum += 3
- elif t.lower() == "o":
- total_sum += 4
- elif t.lower() == "u":
- total_sum += 5
- print(total_sum)
- зад 10
- number = int(input())
- total_sum = 0
- for num in range(number):
- new_number = int(input())
- total_sum += new_number
- print(total_sum)
- зад 11
- n= int(input("Итерации: "))
- sum= 0
- for i in range(n):
- число= int(input("Въведете число: "))
- sum += число
- print("Сумата на числата е:", sum)
- # зад 12
- n= int(input("Въведете броя на числата: "))
- even_sum= 0
- odd_sum= 0
- for i in range(n):
- number= int(input("Въведете число "))
- if i % 2 == 0:
- even_sum += number
- else:
- odd_sum+=number
- if even_sum == odd_sum:
- print("Yes")
- print("Sum="+str(even_sum))
- else:
- print("No")
- print("Diff="+str(abs(even_sum - odd_sum)))
- #зад 13
- Господине 13 задача не мога да я реша
- Nov 26
- зад.3
- working_days=int(input())
- bike_price=float(input())
- total_money=0
- for day in range(1, working_days + 1):
- if day % 2 == 0:
- salary= 100
- else:
- salary= 150
- if day % 5 == 0:
- salary *= 0.8
- total_money += salary
- total_money -= 10 # wife's coffee money
- if total_money >= bike_price:
- print(f"Да, и ми останаха {total_money - bike_price} лева")
- else:
- print(f"Не, трябват ми още {bike_price - total_money} лева")
- зад.4 господине не я разбирам и не мога да я направя.
- Dec 9
- зад 1
- for i in range(1, 10 +1):
- print(i)
- зад 2
- for i in range(1, 10 + 1):
- print(i ** i)
- зад 3
- for i in range(1, 10 + 1):
- print(i)
- print("Done!")
- зад 4
- for i in range(1, 101):
- if i % 10 == 3:
- print("*")
- continue
- print(i)
- зад 5
- n = int(input())
- for i in range(n + 1):
- print(i)
- зад 6
- for i in range(-10, 1):
- print(i)
- зад 7
- total_sum = 0
- for i in range(1, 100 + 1):
- total_sum += i
- print(total_sum)
- зад 8
- total_sum = 0
- for i in range(0, 100 + 1):
- if i % 2 == 0:
- total_sum += i
- print(total_sum)
- зад 9
- total_sum = 0
- for i in range(0, 100 + 1):
- if i % 2 == 1:
- total_sum += i
- print(total_sum)
- зад 10
- n = int(input())
- for i in range(2, n):
- if (i % n == 0):
- print(f"{n} is not prime")
- break
- else:
- print(i)
- зад 11
- text=input()
- for t in text:
- print(t)
- зад 12
- text = input()
- for t in text:
- print(t, end = ",")
- зад 13
- text = input()
- print(text[::-1])
- Dec 10
- zad 1
- while True:
- name = input()
- if name == "Stop":
- break
- print(name)
- zad 2
- user = input()
- set_password = input()
- while True:
- name = input()
- if name == user:
- password = input()
- if password == set_password:
- print("Welcome")
- break
- else:
- print("try again")
- else:
- print("try again")
- zad 3
- number = int(input())
- total_sum = 0
- new_number = int(input())
- while total_sum < number:
- total_sum += new_number
- if total_sum > number:
- break
- new_number = int(input())
- print(total_sum)
- zad 4
- N = int(input(
- current_number = 1
- while current_number <= N:
- print(current_number, end=", ")
- current_number = current_number * 2 + 1
- zad 5
- Господине, 5-та задача от това домашно не я разбирам стигам до някъде, но не става!
- зад 6
- също не мога да я разбера!
- зад 7
- и нея не мога да разбера! Ако ги направя ще ви ги пратя!!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement