Initial commit: project setup

This commit is contained in:
Матвей Карачев 2026-04-03 22:02:10 +03:00
parent 72f7c8f949
commit 29cce33c3f
7 changed files with 59 additions and 0 deletions

5
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12 (uga)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (uga)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/uga.iml" filepath="$PROJECT_DIR$/.idea/uga.iml" />
</modules>
</component>
</project>

10
.idea/uga.iml generated Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.12 (uga)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

17
buga.py Normal file
View File

@ -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)