from __future__ import annotations

from collections.abc import Generator






def  __lowerCamelCase						(		lowerCAmelCase__      ):
       if not isinstance(snake_case_      ,    snake_case_      ) or n < 1:
              raise Exception('Sequence only defined for positive integers'      )

       yield n
       while n != 1:
              if n % 2 == 0:
                     n //= 2
              else:
                     lowerCAmelCase__	      =   3 * n + 1
              yield n






def  __lowerCamelCase						(		):
       lowerCAmelCase__	      =   4_3
       lowerCAmelCase__	      =   tuple(collatz_sequence(snake_case_      )      )
       print(snake_case_      )
       print(F"""Collatz sequence from {n} took {len(snake_case_      )} steps."""      )


if __name__ == "__main__":
    main()



'''simple docstring'''







from __future__ import annotations

from collections.abc import Generator






def 					_SCREAMING_SNAKE_CASE		(						snake_case_	):
	if not isinstance(snake_case_							,       snake_case_	) or n < 1:
		raise Exception("""Sequence only defined for positive integers"""	)

	yield n
	while n != 1:
		if n % 2 == 0:
			n //= 2
		else:
			_lowercase							=     3 * n + 1
		yield n






def 					_SCREAMING_SNAKE_CASE		(						):
	_lowercase							=     43
	_lowercase							=     tuple(collatz_sequence(snake_case_	)	)
	print(snake_case_	)
	print(F"""Collatz sequence from {n} took {len(snake_case_	)} steps."""	)


if __name__ == "__main__":
							main()




