pomenal
This commit is contained in:
parent
551b0456c4
commit
5a1fb1bd67
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@ -2,6 +2,8 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/order_system" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/practice_project" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/practice_project" vcs="Git" />
|
||||||
|
<mapping directory="$PROJECT_DIR$/practice_project/order_system" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
18
buga.py
18
buga.py
@ -1,18 +0,0 @@
|
|||||||
# 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)
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user