h=0.1;
xt=Table[i*h,{i,0,10}];
psi[x_]:= Sin[Pi*x]
psi[xt]

0.588/2

((0.309+0.809)/2)

n=10;NN=5;
a=0.;b=1.;T=0.025;
h=((b-a)/n);tau=(T/NN);
xt=Table[i*h,{i,0,n}];
tt=Table[j*tau,{j,0,NN}];
psi[x_]:= Sin[Pi*x]
u=psi[xt];
u1=u;
points=Table[{xt[[i]],tt[[1]],u[[i]]},{i,1,n+1}];
For[j=0,j≤NN,j++,
For[i=2,i≤n,i++,
u1[[i]]=(1/2)(u[[i-1]]+u[[i+1]])
];
Print[u1];
u=u1
]

(0.559/2)