07. Shopping
Здравейте, решавам задача номер 7 от 6-та лекция(упражнения):
Линк към условието:
https://softuni.bg/trainings/resources/officedocument/65089/проверки-упражнение-programming-basics-with-python-october-2021/3512
Това е моето решение:
peters_budget = float(input())
video_cards_order = float(input())
cpu_order = float(input())
ram_order = float(input())
video_card_price = 250 * video_cards_order
cpu_price = (video_card_price * 0.35) * cpu_order
ram_price = (video_card_price * 0.10) * ram_order
total_price = video_card_price + cpu_price + ram_price
if video_cards_order > cpu_order:
total_price = total_price - (total_price * 0.15)
if peters_budget > total_price:
print(f"You have {peters_budget - total_price} leva left!")
else:
print(f"Not enough money! You need {abs(peters_budget - total_price):.2f} leva more!")
2-та входа в условието си минават без проблем. Judge прави 10 проверки и 2 гърмят, съответно аз взимам само 80 от 100 точки. Гърмят 9-ta и 10-та проверка като там нищо не пише, защo какво и как проверява.
Давам и линк към Judge на задачата:
https://judge.softuni.org/Contests/Compete/Index/2414#6
Благодаря предварително.
Благодаря ти, 100/100!
Khi kiểm tra xem ngân sách có đủ hay không, bạn cũng nên bao gồm tùy chọn rằng diggy sách chuyên cần bằng với giá trị của nó, không chỉ lớn hơn. Bản in không ...
Thanks for being specific, I got it dumb ways to die