Is says that “The effect of this code is that it will give the player a second chance if they drink a potion that would normally eliminate them.”
but on the else if you are giving the players more than a second chance, for example:
PlayerHealth = 79.0
after the function Player will be 78.0 as you are only decresing PlayerHealth by 1.0. The player can continue to “drink” the potion 77 more times.