-
Notifications
You must be signed in to change notification settings - Fork 31
fix: correct operation input type from int to str #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
smrnvdn
wants to merge
5
commits into
ruslansenatorov:dev
Choose a base branch
from
smrnvdn:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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`). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| # ЗДЕСЬ ДОЛЖНА БЫТЬ ДОКУМЕНТАЦИЯ К ПРОЕКТУ | ||
|
|
||
| # УЧЕБНЫЙ ПРОЕКТ | ||
| - Проект калькулятора, форк другого репозитория для исправления ошибок |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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")) | ||
|
|
||
| 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() | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review