I struggling to get why in bootstrapping I need to divide the YTM by 2 (for semiannual coupons) and not adjust the power for the semiannual period. Please see below example.

Consider two bonds with a face value of $100, with the yield to maturity equal to the coupon rate: Maturity 0.5 Year 1 Year Yield to Maturity 3.0% 3.50% Now, for a zero-coupon with a maturity of 6 months, it will receive a single coupon equivalent to the bond yield. Hence, the spot rate for the 6-month zero-coupon bond will be 3%. For a 1-year bond, there will be two cash flows, at 6 months and at 1 year. The cash flow at 6 months will be (3.5%/2 * 100 =$ 1.75)

and cash flow at 1 year will be (100 + 1.75 = \$ 101.75)

From the 0.5-year maturity the spot rate or the discount rate is 3% and let us assume the discount rate for 1-year maturity be x%, then

100 = 1.75/(1+3%/2)^1 + 101.75/(1+x/2)^2

why we divide the coupon by 2 and don't adjust the power as follows? (assume semi annual coupon so 180 days for the 1st cashflow and 360 for the 2nd cashflow):

100 = 1.75/(1+3%)^(180/360) + 101.75/(1+x)^(360/360)

https://www.wallstreetmojo.com/bootstrapping-yield-curve/

Can you please explain the logic behind it as you would do to an undergraduate student?