Borbély Gábor

1. Feladat

a)

(((((1+(Sqrt[5]))/2)))^5)+(((((1-(Sqrt[5]))/2)))^5)

b)

(((((Binomial[4,1]+Binomial[4,2]+Binomial[4,3])/4)))^2)

c)

Expand[(((((y-x))^4)-(x^4)-(y^4))/2)]

d)

Simplify[(((((1+(Sqrt[5]))/2)))^5)+(((((1-(Sqrt[5]))/2)))^5)]

2. Feladat

a)

1/(1+1/(1+1))
1/(1+1)/(1+1)
1/((1+1)/(1+1))

b)

-1+1/2^(1-1)

c)

1/{1,{2,3,4}}[[2,3]]

3. Feladat

F[x_]:=If[IntegerQ[x], If[x>0,If[EvenQ[x], x/2,3x+1],False], False]

F[x]
F["x"]
F[3]
F[-4]
F[4.5]
F[4]

4. Feladat

x = 3
n = 3
(((1+x))^n)
ClearAll[n,x]
(((1+x))^n)

5. Feladat

n=3
x=3.14
f[x_, n_]:=(x^n)
g[n_]:=If[n<1,3,n]
h[y_]:=Max[x,y]
Table[f[h[y],n],{y,Range[g[2 n]]}]

6. Feladat

Show[
Plot[Cos[Pi x],{x,-1,1}],
Plot[x,{x,-1,1}, PlotStyle->Dashed],
Plot[(1/x),{x,-1,-1/4},PlotStyle->Black],
Plot[(1/x),{x,1/4,1},PlotStyle->Black]
, PlotRange->All
]

7. Feladat

Show[
Plot[1-(x^2),{x,-1,1}, Filling->Axis],
Plot[0,{x,-2,-1}],
Plot[0,{x,1,2}],
Plot[0,{x,-1,1}, PlotStyle->Red],
PlotRange->All
]

8. Feladat

Forditva[s_,n_]:=StringJoin[Table[If[OddQ[i],s,StringReverse[s]],{i,1,n,1}]]

Forditva["abc",1]
Forditva["abc",2]
Forditva["abc",3]
Forditva["abc",4]