Загрузка данных


name = input("Введите название товара: ")
price = float(input("Введите цену за штуку: "))
quantity = int(input("Введите количество: "))
has_card = input("Карта клиента (да/нет): ").strip().lower()

summa = price * quantity

# Логика скидок
if has_card == "да" and summa >= 1000:
    discount_percent = 15
elif has_card == "да" and summa < 1000:
    discount_percent = 5
elif has_card == "нет" and summa >= 3000:
    discount_percent = 10
else:
    discount_percent = 0

discount_amount = summa * discount_percent / 100
total_to_pay = summa - discount_amount

print(f"Товар: {name}\nСумма: {summa} руб.\nСкидка: {discount_percent}%\nК оплате: {total_to_pay} руб.")