0

(Python) Plz help with this collatz conjunction using two input and finding the highest length between the first and last input

Lower_bound = int(input()) Upper_bound = int(input()) Length = 1 while lower_bound != 1: while lower_bound <= upper_bound: If lower_bound % 2 == 0: lower_bound = lower_bound // 2 else: lower_bound = lower_bound * 3 + 1 length += 1 lower_bound += 1 print(lower_bound) print(length)

14th Apr 2025, 7:28 PM
Jaime- Brawl Stars
Jaime- Brawl Stars - avatar
1 Respuesta
0
Jaime- Brawl Stars it looks like you are missing some code ... Please show us your full code by copy and pasting in a python development code-bit...
14th Apr 2025, 9:46 PM
BroFar
BroFar - avatar