Skip to content

Instantly share code, notes, and snippets.

@RimMirK
Created April 11, 2023 07:29
Show Gist options
  • Save RimMirK/78b9b7bd83f5145225c815824065c1d8 to your computer and use it in GitHub Desktop.
Save RimMirK/78b9b7bd83f5145225c815824065c1d8 to your computer and use it in GitHub Desktop.
2134
from random import*
a = int(input("введи целое число: "))
x = False
while True:
if a % 2 != 0:
a = a*3+1
print(a)
continue
if a % 2 != 0:
a /= 2
print(a)
continue
input()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment