From 29cce33c3f9fb7146ea20637529f8d13aff88da2 Mon Sep 17 00:00:00 2001 From: stud203789 Date: Fri, 3 Apr 2026 22:02:10 +0300 Subject: [PATCH] Initial commit: project setup --- .idea/.gitignore | 5 +++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 7 +++++++ .idea/modules.xml | 8 ++++++++ .idea/uga.iml | 10 ++++++++++ .idea/vcs.xml | 6 ++++++ buga.py | 17 +++++++++++++++++ 7 files changed, 59 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/uga.iml create mode 100644 .idea/vcs.xml create mode 100644 buga.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..9795d9a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b640e6d --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uga.iml b/.idea/uga.iml new file mode 100644 index 0000000..85efecc --- /dev/null +++ b/.idea/uga.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/buga.py b/buga.py new file mode 100644 index 0000000..068ae00 --- /dev/null +++ b/buga.py @@ -0,0 +1,17 @@ +# 10 функций для учета заказов +def get_total(price, count): return price * count +def apply_tax(amount): return amount * 1.2 +def get_discount(amount): return amount * 0.9 if amount > 1000 else amount +def format_item(item): return item.strip().capitalize() +def is_valid_count(count): return count > 0 +def check_limit(amount): return amount < 100000 +def get_status(is_paid): return "Оплачено" if is_paid else "Ожидает" +def calc_shipping(weight): return weight * 50 +def get_info(id, item): return f"Заказ #{id}: {item}" +def final_report(res): print(f"Итог: {res} руб.") + +if __name__ == "__main__": + # Пример вызова + price = get_total(100, 5) + with_tax = apply_tax(price) + final_report(with_tax)