def is_delivery_free(order_total):
if order_total >= 50:
return True
else:
return False
order_total = float(input("Введіть загальну суму замовлення: "))
if is_delivery_free(order_total):
print("Доставка безкоштовна")
print("Доставка платна")
Функция:
def is_free_shipping(total_amount):
if total_amount >= 50:
Функцию можно вызвать так:order_amount = 75.00
if is_free_shipping(order_amount):
print("Доствавка бесплатна")
print("Доставка платная")
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
def is_delivery_free(order_total):
if order_total >= 50:
return True
else:
return False
order_total = float(input("Введіть загальну суму замовлення: "))
if is_delivery_free(order_total):
print("Доставка безкоштовна")
else:
print("Доставка платна")
Verified answer
Функция:
def is_free_shipping(total_amount):
if total_amount >= 50:
return True
else:
return False
Функцию можно вызвать так:
order_amount = 75.00
if is_free_shipping(order_amount):
print("Доствавка бесплатна")
else:
print("Доставка платная")