-
-
Notifications
You must be signed in to change notification settings - Fork 49k
feat: Add initial set of logic building problems #13600
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
base: master
Are you sure you want to change the base?
feat: Add initial set of logic building problems #13600
Conversation
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.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| - If n is odd, multiply it by 3 and add 1. | ||
| """ | ||
|
|
||
| def collatz_sequence(n: int) -> list[int]: |
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.
Please provide descriptive name for the parameter: n
logic_building_problems/hangman.py
Outdated
| """ | ||
| import random | ||
|
|
||
| def play_hangman(): |
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.
Please provide return type hint for the function: play_hangman. If the function does not return a value, please provide the type hint as: def function() -> None:
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/hangman.py, please provide doctest for the function play_hangman
|
|
||
| KAPREKARS_CONSTANT = 6174 | ||
|
|
||
| def kaprekar_routine(n: int) -> list[int]: |
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.
Please provide descriptive name for the parameter: n
| """ | ||
| import random | ||
|
|
||
| def guessing_game(low: int, high: int): |
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.
Please provide return type hint for the function: guessing_game. If the function does not return a value, please provide the type hint as: def function() -> None:
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/number_guessing_game.py, please provide doctest for the function guessing_game
| """ | ||
| import random | ||
|
|
||
| def play_rock_paper_scissors(): |
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.
Please provide return type hint for the function: play_rock_paper_scissors. If the function does not return a value, please provide the type hint as: def function() -> None:
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/rock_paper_scissors.py, please provide doctest for the function play_rock_paper_scissors
04a8af4 to
6fa940a
Compare
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.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| import random | ||
|
|
||
|
|
||
| def play_hangman() -> None: |
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.
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/hangman.py, please provide doctest for the function play_hangman
| import random | ||
|
|
||
|
|
||
| def guessing_game(low: int, high: int) -> None: |
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.
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/number_guessing_game.py, please provide doctest for the function guessing_game
| import random | ||
|
|
||
|
|
||
| def play_rock_paper_scissors() -> None: |
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.
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/rock_paper_scissors.py, please provide doctest for the function play_rock_paper_scissors
6fa940a to
690678a
Compare
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.
Click here to look at the relevant links ⬇️
🔗 Relevant Links
Repository:
Python:
Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.
algorithms-keeper commands and options
algorithms-keeper actions can be triggered by commenting on this PR:
@algorithms-keeper reviewto trigger the checks for only added pull request files@algorithms-keeper review-allto trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.
| import random | ||
|
|
||
|
|
||
| def play_hangman() -> None: |
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.
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/hangman.py, please provide doctest for the function play_hangman
| import random | ||
|
|
||
|
|
||
| def guessing_game(low: int, high: int) -> None: |
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.
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/number_guessing_game.py, please provide doctest for the function guessing_game
| import random | ||
|
|
||
|
|
||
| def play_rock_paper_scissors() -> None: |
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.
As there is no test file in this pull request nor any test function or class in the file logic_building_problems/rock_paper_scissors.py, please provide doctest for the function play_rock_paper_scissors
Describe your change:
This pull request introduces a new
logic_building_problemsdirectory as discussed in issue #13501. It adds a collection of classic programming problems to help beginners practice core logic skills before tackling more complex data structures.The added problems include various star patterns, number theory puzzles like Kaprekar's Constant, and simple interactive games. Since this PR establishes a new category, it contains multiple files.
Fixes #13501
Checklist: