Transmission Line (strip line)
As written in the task the L and H should be greater than 20h and impedance should be 50 ohms. Please help to adjust these parameters so that after changing the L and H I still get 50 ohms.


The point of this requirement is that if \$L\$ and \$H\$ are large compared to \$W\$ and \$h\$, then they will not affect the characteristic impedance much. Adjusting \$L\$ or \$H\$ should not change \$Z_0\$ noticeably. 

In general, increasing \$W\$ should reduce \$Z_0\$ and increasing \$h\$ should increase \$Z_0\$. That should give you enough to nail down a combination of \$W\$ and \$h\$ that reaches \$Z_0=50\ \Omega \pm 5\ \Omega\$ within 3 or 4 tries.


  In the codes, in the last, I am not able to understand the Tolerance testing Part.


I can't read your codes, but this likely means simulating small changes in \$W\$ and \$h\$ to see how big a change they cause in \$Z_0\$.