Sponsored links: Algebra eBooks
 

Related

tokens

tokens("my jsme");

Calculate

tokens

tokens("my jsme");

Calculate

tokens

Run Example
(%i1)tokens("my jsme");
(%o1)                             [my, jsme]
(%i2) 
Run Example
lot(a):=block([d:[],e:[],f:[],g:" ",i:1,k:1,x:0,y:0],           d:tokens(a),           x:length(d),          for i:1 thru x do            (e:d[i]), f:charlist(e), y:length(f), z:"",             for j:1 thru floor(y,2) do                (z:concat(z,f[j]),                  z:concat(z,f[y-j+1])),              g:concat(g,z),             g:(concat(g," ")),    print(g));
(%o1) lot(a) := block([d : [], e : [], f : [], g : " ", i : 1, k : 1, x : 0, 
y : 0], d : tokens(a), x : length(d), for i thru x do e : d , f : charlist(e), 
                                                           i
y : length(f), z : "", for j thru floor(y, 2) 
do (z : concat(z, f ), z : concat(z, f         )), g : concat(g, z), 
                   j                  y - j + 1
g : concat(g, " "), print(g))
(%i2) a:"adam ke dau";
(%o2)                             adam ke dau
(%i3) d:tokens(a);
(%o3)                           [adam, ke, dau]
(%i4) length(d);
(%o4)                                  3
(%i5) floor(3/2);
(%o5)                                  1
(%i6) 
Run Example
lot(a):=block([d:[],e:[],f:[],g:" ",i:1,k:1,x:0,y:0],           d:tokens(a),           x:length(d),          for i:1 thru x do            (e:d[i]), f:charlist(e), y:length(f), z:"",             for j:1 thru floor(x,2) do                (z:concat(z,f[j]),                  z:concat(z,f[y-j+1])),              g:concat(g,z),             g:(concat(g," ")),    print(g));
(%o1) lot(a) := block([d : [], e : [], f : [], g : " ", i : 1, k : 1, x : 0, 
y : 0], d : tokens(a), x : length(d), for i thru x do e : d , f : charlist(e), 
                                                           i
y : length(f), z : "", for j thru floor(x, 2) 
do (z : concat(z, f ), z : concat(z, f         )), g : concat(g, z), 
                   j                  y - j + 1
g : concat(g, " "), print(g))
(%i2) a:"adam ke dau";
(%o2)                             adam ke dau
(%i3) tokens(a);
(%o3)                           [adam, ke, dau]
(%i4) 

Related Help

Help for Tokens