Print["Zadacha 1"]
X = {0, 2, 4, 6, 9, 11, 12, 15, 17, 19};
Y = {5, 6, 7, 6, 9 , 10, 9 , 10, 12, 12};
n = Length[X];
plotList = 
  ListPlot[Table[{X[[i]], Y[[i]]}, {i, 1, n}], PlotRange -> {-1, 20}, 
   PlotMarkers ->];
Error[k_, u_, w_]  := u * X[[k]] + w - 1/Y[[k]]
Func[u_, w_] := (∑_(i=1)^n)Error[i, u, w]^2
solution = Solve[
  {
   D[Func[u, w], u] == 0,
   D[Func[u, w], w] == 0
   }, {u, w}]
a = 1/u /. solution[[1]];
b = w*a /. solution[[1]];
f[x_] = a / (x + b)
plotFunc = Plot[f[x], {x, -1, 20}];
Show[plotList, plotFunc]