Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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`).
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():
"""This is a simple calculator that can calculate the sum, difference, product
and division of two numbers it takes two numbers and an operation as input and
prints the result of the operation it also checks if the operation is valid and
if the second number is not zero for division it also checks if the operation
is valid and if the second number is not zero for division."""


def calculator() -> None:
"""
this function is used to calculate the sum, difference, product and division of two numbers
input:
no_1: int
operation: str
no_2: int
output:
print the result of the operation
"""
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"))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review


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