22,输入n, 求1-1/3+1/5-1/7…1/n的值 n =int(input("请输入n:")) e=1 for i in range(1,n+1): e=e+(-1)**i*(1/(2*n+1)) print(e)