-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Added ✅ : josephus problem #2623
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.
Hey @srini047! Thanks for contributing to this project! We are a rather small team, so it may take some time to process this request. In the meantime, there are several ways you can make yourself a part of The Renegade Coder community. For instance, you can:
- Subscribe to the monthly newsletter
- Become a patron
- Join us on Discord
- And, check out the rest of the list which includes links to The Renegade Coder YouTube channel and Twitter account
Thanks for your help!
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.
Really great start! I would take a peek at the docs: https://sampleprograms.io/projects/josephus-problem/
n and k should come from the command line (i.e., sys.argv).
Done with the necessary changes @jrg94 |
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.
Looks awesome! The last print might be incorrect, but otherwise this looks good. Going to let the tests run once more before I officially merge.
@jrg94 any updates on the test. |
Yes, sorry! I've been on vacation. Here are the test results (seems like a quick fix):
|
archive/p/python/josephus_problem.py
Outdated
print("Usage: please input the total number of people and number of people to skip.") | ||
exit(1) | ||
|
||
print("Safe place: ", josephus(n, k)) |
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.
print("Safe place: ", josephus(n, k)) | |
print(josephus(n, k)) |
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.
@jrg94 Changes addressed.
Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder!
For simplicity, please make sure that your pull request includes one and only one contribution.
Please fill one of the sections below as applicable.
Please also add any other relevant information to the Notes section at the bottom.
You may delete or just ignore any other sections.
For more information please refer to our contributing documentation
I Am Adding a New Code Snippet in an Existing Language
Add
josephus_problemin
.py`` formatI Am Adding a New Code Snippet in a New Language
Add {PROJECT} in {LANGUAGE}
formattestinfo.yml
files (see [contributing documentation][contributing-new-language])I Am Adding New Tests for a Project
Add {PROJECT} tests
formatI Am Adding New Tests for a Language
Add {LANGUAGE} tests
format\testinfo.yml
files (see [contributing documentation][contributing-new-language])I Am Modifying an Existing Code Snippet or Existing Tests
Modify {PROJECT} {tests} in {LANGUAGE}
formatOther Notes
Add notes here...