Look at your condition:
while ch.lower() != 'y' or ch.lower() != 'n':
If ch is "y" then it's not "n" - it can't be both.
Similarly, if ch is "n" then it's not "y"
So every time you check, one or other of those tests will be
true
, so it goes around again.
Try replacing
or
with
and
and it'll exit the loop when you enter one or the other.