Hi Sophia, welcome! Seems like @cameron spotted the issue, and I echo @J-M0 's comments about formatting—at least on the web, its almost impossible to follow your code without code block formatting (you can use the preview pane to the right of your message to make sure it shows up correctly). If you’d like further feedback on your implementation, I’d be happy to do so provided it is formatted legibly.
I just wanted to add, however, we recently helped another using solve a very similar problem to yours (getting stuck in a while loop in a blackjack game when trying to exit; must be a common beginner exercise), so you might be interested in checking out the approach in that thread and my suggestions on it and compare it to yours, as its often very worthwhile to do. Cheers!