Ask Alexa on Amazon Echo (Dot) to respond to an ongoing series of questions with just two functions. Fundamentally, this is a simple faux state machine.
This is a simple demo of an Alexa skill for the Amazon Echo family of smartspeakers using Flask-Ask to handle repeated question-answer interaction. My favorite skill is Cinema Playground Screen Test, so this emulates the multi-step process of asking questions and incrementing the score.
Basically, the HTTP app persists the user's response and their score in the session.attributes dictionary, looped over in the number_challenge function. A simple "yes" or "no" response bridges the data.