The method pricingZeroCouponBond() is developed to compute the Price of a Zero-Coupon Bond. So, pricingZeroCouponBond() gives the Price of a Zero-Coupon Bond for values passed to its three arguments. Here, maturityVal represents the Maturity Value of the Bond, n is number of years till maturity, and r is Market Discount Rate or Required Rate of return. The output is rounded off to three decimal places. The given examples show various ways in which the arguments can be passed to pricingZeroCouponBond() for two different bonds.
References
Adams,J.F. & Smith,D.J.(2019). Introduction to fixed-income valuation. In CFA Program Curriculum 2020 Level I Volumes 1-6. (Vol. 5, pp. 107-151). Wiley Professional Development (P&T). ISBN 9781119593577, https://bookshelf.vitalsource.com/books/9781119593577