1)ukol

(%i7) soucet(n):=
    if is(mod(n,2)=1) then(
        s:0,
            for i:1 step 2 thru n do(s:s+i),
        s
        )
    else
        print(n,"neni liche cislo");

Result

(%i8) soucet(11);

Result

(%i10) soucet(10);

Result

(%i9) soucet(9);

Result

2)ukol

(%i11) prumer(n):=sum(seznam[i],i,1,length(n))/length(n);

Result

(%i16) seznam:[0,1,2,3];

Result

(%i17) prumer(seznam);

Result

3)ukol

(%i22) graf(f,pom):=((df:ev('diff(f,x,1), nouns)),wxplot2d([f,df],[x, pom[1], pom[2]]));

Result

(%i23) graf(sin(x), [-2,2]);

Result


Created with wxMaxima.