I don't know if you pasted it wrong or something but -
1. You have def where it seems you are trying to call the function
2. Since the while loop is in the display_prompt, it is not called and it will keep playing over and over if called
1. You have def where it seems you are trying to call the function
2. Since the while loop is in the display_prompt, it is not called and it will keep playing over and over if called