Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 <hugofollogua07@gmail.com> 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‎

Lines changed: 1 addition & 0 deletions
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‎

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /