not all arguments converted during string formatting.. NO % variables

x = input()
y = 1 
print (x)
while 1 == y:
if x == 1:
    y == y + 1
elif x % 2 == 0: #even
    x = x // 2
    print (x)
else:
    x = 3 * x + 1
    print (x)

If you know what the Collatz conjecture is, I’m trying to make a calculator for that. I want to have x as my input so I don’t have to change x’s number and save every time I want to try out a new number.

I get below error

TypeError: not all arguments converted during string formatting’ at line 7.

Please help a noobie out.

Leave a Comment