如果可行,点点你的小手,请采纳,谢谢
xstr = input("Input x: ") x = float(xstr) if not x == 0: res = pow(x,2) + 2*(x + 1)/3 res = round(res,2) print('y=%s' %res) else: print('y=0')