Fixed the prompt.yn function to work on Python3.