Question: Warning, premature end of input

restart:with(plots):with(plottools):with(stats):
unprotect(D):
a[1]:=0:a[2]:=0.2:a[3]:=-0.15:a[4]:=0.85:
b[1]:=0:b[2]:=-0.26:b[3]:=0.28:b[4]:=0.04:
c[1]:=0:c[2]:=0.23:c[3]:=0.26:c[4]:=-0.04:
d[1]:=0.16:d[2]:=0.22:d[3]:=0.24:d[4]:=0.85:
e[1]:=0:e[2]:=0:e[3]:=0:e[4]:=0:
f[1]:=0:f[2]:=0.2:f[3]:=0.2:f[4]:=0.2:
p[1]:=0.01:p[2]:=0.08:p[3]:=0.15:
N:=10000:x[0]:=0:y[0]:=0:
randomize():
for n from 0 to N do
r[n]:=rand()/(10)^(12);
if r[n]then i:=2 elif r[n]x[n+1]:=a[i]*x[n]+b[i]*y[n]+e[i];
y[n+1]:=c[i]*x[n]+d[i]*y[n]+f[i];
pt[n+1]:=[x[n+1],y[n+1]];
do:
Warning, premature end of input, use + to avoid this message.
p:=pointplot([seq(pt[n],n=1..N)],style=point,symbol=
point,lables=["x","y"],tickmarks=[3,3],scaling=constrained,
axes=boxed,view=[-0.75..0.75,0..1.5],color=green);
Error, (in plots:-pointplot) points cannot be converted to floating-point values
T:=6:M:=10*T:epsilon:=3/(2*T);delta:=1/epsilon;
gr:=seq(seq(polygonplot([[-0.75+epsilon+i*j],[-0.75+epsilon*(i+1),epsilon*j],
[-0.75+epsilon*(i+1),epsilon*(j+1)],
[-0.75+epsilon+i,epsilon*(j+1)]]),i=0..M),j=0..M):
Error, (in plots:-polygonplot) lists of different lengths found in points data
display({p,gr});
Error, (in plots:-display) expecting plot structures but received: {gr, p}
This code is taken from Nonlinear Physics With Maple for Scientists 
and Engineers  by Richard H. Enns, George McGuire
Please Wait...