You seem a bit confused on the units of time.

is the annual nominal interest rate. 20 is the number of years for the loan.

is the semi-annual effective interest rate. 40 is the number of half-years for the loan.

is the monthly effective interest rate. 240 is the number of months for the loan.