问题相关代码
def collatz(number):
if number%2==0: # 这里报错 “not all arguments converted during string formatting”
print(number//2)
number=number/2
else:
print(3number+1)
number=3number+1
return number
print('请输入数字')
number=input(int())
while number !=1:
collatz(number)
continue
print ('结束')