def ssq(f): if f%2==1: f=f*3+1elif f%2==0: f=f//2return ftry: w = int(input('请输入:'))except ValueError: print('cacacacac')while w>1: w=ssq(w) print(w) continue题目要求用try--except检查输入数据类型是否为int类型进行异常处理,不会,求教
isinstance(w, int)