I’ve made the code’s readability as easy as possible with inline comments and \n added to strings for better comprehension. Using web emulators, especially when developing a story driven application, can be difficult to read and write. Also, in order to limit code, I used one print statement instead of three (it’s more of a stylistic practice, not required) starting on line 18.
Python has a lot of modules, but, trying not to cause too much confusion for developers when coding, many are left out so you will need to import. Nevertheless, the first line imports the time module. It’s slowed to one second, but can be increased to give the reader more time to finish reading the previous sentence.
If somewhat familiar with coding, most of it should make sense, such as if, elif, and else statements. The only oddity, but will make a text-based game dynamic, will be how the user answers the questions. If a particular answer is given, the user will be branched to a separate section. Now, my code only scratches the surface of branching, but you can send a user into 20 different paths if you want. Below is a flowchart to make the branching a little easier to understand.