FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Collatz Conjecture Dig Deeper]: Corrections & Edit by BethanyG · Pull Request #4250 · exercism/python · GitHub

Repository navigation

[Collatz Conjecture Dig Deeper]: Corrections & Edit - #4250

Merged
BethanyG merged 4 commits into
exercism:mainfrom
BethanyG:fix-collatz-dig-deeper
Jun 23, 2026
Merged

BethanyG merged 4 commits into
exercism:mainfrom
BethanyG:fix-collatz-dig-deeper

Conversation

Copy link
Copy Markdown
Member

See issue #4197 for details.

I tried my best to address the awkwardness, but failed in some cases. Recursion might need a re-write.


The key to this exercise is to check if the number is even or odd and then perform the correct operation.
Under this process you are supposed to count how many steps it takes to get to one.
Under this process (_if the data is not [pathological][collatz-pathological]_), the result will settle at 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This link does seem useful, but it being right here confused me, as it does not mention the word "pathological".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think we keep it. Unless you'd like to replace it with a def of "pathological data"? The point being ... and I was frustrated I couldn't find a clearer article, but if you use something like 27 (which takes 111 steps to settle), or some other numbers, it can take a long time to come to 1. That being said, we know all numbers up to about 2^71 will settle, it is just a matter of the number of steps.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Open to suggestions on how to describe the link.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

went with

(if the input number doesn't create an excessively [long cycle][collatz-pathological]), the result will settle at 1.

"introduction": {
"authors": ["bethanyg", "meatball133"],
"contributors": []
"contributors": ["Yrahcaz7"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I thought the usernames had to be in lowercase... Does the casing actually not matter?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not sure. I've had cases where I swear my name in lowercase didn't count ... but IDK for sure. Maybe keep an eye out and see? We can come back later and change things.

Copy link
Copy Markdown
Contributor

I think the approach docs look a lot better now. recursion might still be a little awkward, but it's not that bad.

BethanyG and others added 2 commits June 22, 2026 16:19
Suggestions from review.

Co-authored-by: Yrahcaz <74512479+Yrahcaz7@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
BethanyG requested a review from Yrahcaz7 June 22, 2026 23:32
BethanyG merged commit 4d03daf into exercism:main Jun 23, 2026
7 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL