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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -740,6 +740,7 @@
* [Tower Of Hanoi](other/tower_of_hanoi.py)
## Physics
* [Altitude Pressure](physics/altitude_pressure.py)
* [Archimedes Principle](physics/archimedes_principle.py)
* [Basic Orbital Capture](physics/basic_orbital_capture.py)
* [Casimir Effect](physics/casimir_effect.py)

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.")