A "Financial Life Selector" could let students choose careers, investments, and lifestyle, with XML encoding consequences on their virtual net worth.
# Apply effects for effect in selected.findall('effect'): for attr, val in effect.attrib.items(): self.vars[attr] = self.vars.get(attr, 0) + int(val)
Let us build the skeleton. A robust Life Selector XML file typically contains four major sections: <world> , <traits> , <events> , and <endings> .