+ 3
Your code works fine. You need to enter all inputs at the same time in the playground. This means you must make an entry (anything other than yes or y) in order to stop the loop requiring further input. If you don't you'll get an EOF error.
I.E.
yes
y
n
the above loop will run 3 times