repl.it
@AidanMundle/

Conjecture

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
x= int(input("put any number here to test:"))
count=0


# No matter what number you input, it will always go down to 4,2,1 which will repeat to infinity. I made the loop stop at the first 1, but it will continue. I found this pretty interesting
for i in range(10000): 
  if x%2==0:
      x= x/2
      print(x)
      count+=1
  else:
      x=x*3+1
      print(x)
      count+=1
print("Iterations:",count)
Fetching token
?