Python输出格式的问题

Python中输出的格式与要求的不符 应该怎么做(能把代码写出来吗)

img

count=0
x=int(input())
while x!=1:
    if x%2==0:
        print(f"{int(x)}/2={int(x/2)}")
        x=x/2
    else:
        print(f"{int(x)}*3+1={int(3*x+1)}")
        x=3*x+1
    count+=1

x=x//2
两个斜杠才是整除

if x%2==0:
    print(f'{x}*3+1={x*3+1}')
else:
    print(f'{x}/2={x/2}')

x = int(input())
while x != 1:
    if x %2!=0:
        temp = x
        x = x*3+1
        print(f'{temp}*3+1={x}')
    else:
        temp = x
        x = x/2
        print(f'{int(temp)}/2={int(x)}')