Fix merge conflicts to merge change from #5080 (#8911)

* Input for user choose his Collatz sequence

Now the user can tell the algorithm what number he wants to run on the Collatz Sequence.

* updating DIRECTORY.md

---------

Co-authored-by: Hugo Folloni <hugofollogua07@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Tianyi Zheng
2023-07-30 22:23:23 -07:00
committed by GitHub
parent 384c407a26
commit 629eb86ce0
2 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ def collatz_sequence(n: int) -> Generator[int, None, None]:
def main():
n = 43
n = int(input("Your number: "))
sequence = tuple(collatz_sequence(n))
print(sequence)
print(f"Collatz sequence from {n} took {len(sequence)} steps.")