Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 📚 Руководство по вкладу (Contributing Guide)

Спасибо, что решили внести вклад в этот проект! Мы ценим каждую помощь, будь то исправление опечаток, улучшение документации, добавление новой функциональности или сообщение об ошибке.

---

## 🛠️ Как внести вклад

1. Сделайте **Fork** репозитория.
2. Создайте новую ветку:
`git checkout -b feature/ваша-фича` или `git checkout -b fix/ваше-исправление`
3. Внесите изменения.
4. Проверьте, что все тесты проходят:
`pytest`, `npm test`, или другая команда (уточняется в README).
5. Сделайте коммит (см. формат ниже).
6. Отправьте ветку:
`git push origin feature/ваша-фича`
7. Создайте **Pull Request** на GitHub и опишите:
- Что изменено
- Почему это важно
- Ссылки на связанные issue, если есть

---

## ✅ Требования к Pull Request

- Код должен быть чистым, читаемым и отформатированным согласно стандартам проекта.
- Все существующие и новые тесты должны проходить.
- Название и описание PR должны быть понятными.
- Если меняется интерфейс (UI), добавьте скриншоты.

---

## ✍️ Формат сообщений коммитов

Используем [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/):

```
тип(область): краткое описание

[дополнительное описание]
[ссылки на issue, задачи и т.п.]
```

### Примеры:

- `feat(auth): добавлена двухфакторная аутентификация`
- `fix(api): исправлена ошибка 500 при обновлении профиля`
- `docs(readme): обновлена инструкция по установке`
- `refactor(ui): оптимизирована структура компонентов`

**Популярные типы:**
- `feat` — новая функциональность
- `fix` — исправление бага
- `docs` — только изменения в документации
- `style` — изменения форматирования (пробелы, отступы)
- `refactor` — рефакторинг без исправления багов/фич
- `test` — добавление/обновление тестов
- `chore` — прочие задачи (обновление зависимостей и т.д.)

---

## 🤝 Кодекс поведения

Мы придерживаемся [Contributor Covenant](https://www.contributor-covenant.org/) как нашего кодекса поведения.

- Будьте вежливы и уважительны.
- Избегайте токсичного поведения.
- Уважайте чужое время и труд.

---

## 📬 Сообщения об ошибках и предложения

Если вы нашли баг или хотите предложить улучшение:

1. Создайте issue с понятным заголовком.
2. Опишите:
- шаги воспроизведения (для багов)
- что вы ожидаете
- скриншоты, если нужно

---

## 📄 Лицензия

Все вклады принимаются в соответствии с лицензией проекта (см. `LICENSE`).
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Vladislav Gusev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# ЗДЕСЬ ДОЛЖНА БЫТЬ ДОКУМЕНТАЦИЯ К ПРОЕКТУ

# Название проекта
Описание проекта
29 changes: 23 additions & 6 deletions p1_calculator.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
def calculator():
"""p1_calculator.py module
A simple console calculator module implementing basic arithmetic operations:
addition, subtraction, multiplication, and division. Prompts for user input and outputs the calculation result.
Handles division by zero and invalid operation input.

Functions:
— calculator(): launches an interactive calculator in the console.
"""


def calculator() -> None:
"""
A simple console calculator:
— Prompts for two integers and an arithmetic operation;
— Performs the arithmetic operation: +, -, *, /;
— Outputs the result or an error message.
"""
no_1 = int(input("enter your first number"))
operation = int(input("enter arithmetic operation like +,-,*,/"))
operation = input("enter arithmetic operation like +,-,*,/")
no_2 = int(input("enter your second number"))

if operation =='+':
if operation == "+":
print(f"the sum of {no_1} + {no_2} are {no_1 + no_2}")
elif operation =='-':
elif operation == "-":
print(f"the diff of {no_1} - {no_2} are {no_1 - no_2}")
elif operation =='*':
elif operation == "*":
print(f"the product of {no_1} * {no_2} are {no_1 * no_2}")
elif operation =='/':
elif operation == "/":
if no_2 == 0:
print("it gives infinity as it is not divided by zero")
else:
print(f"the sum of {no_1} / {no_2} are {no_1 / no_2}")
else:
print("invalid output")


calculator()