Skip to content

Commit 629eb86

Browse files
tianyizheng02hugofollonigithub-actions
authored
Fix merge conflicts to merge change from TheAlgorithms#5080 (TheAlgorithms#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 <[email protected]> Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
1 parent 384c407 commit 629eb86

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

DIRECTORY.md

+1
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@
740740
* [Tower Of Hanoi](other/tower_of_hanoi.py)
741741

742742
## Physics
743+
* [Altitude Pressure](physics/altitude_pressure.py)
743744
* [Archimedes Principle](physics/archimedes_principle.py)
744745
* [Basic Orbital Capture](physics/basic_orbital_capture.py)
745746
* [Casimir Effect](physics/casimir_effect.py)

maths/collatz_sequence.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def collatz_sequence(n: int) -> Generator[int, None, None]:
5757

5858

5959
def main():
60-
n = 43
60+
n = int(input("Your number: "))
6161
sequence = tuple(collatz_sequence(n))
6262
print(sequence)
6363
print(f"Collatz sequence from {n} took {len(sequence)} steps.")

0 commit comments

Comments
 (0)