def convert_q1_choice(choice): mapping = { "1. Explanation A was *much easier* to understand": 1, "2. Explanation A was *somewhat easier* to understand": 2, "3. Both explanations were *about the same*": 3, "4. Explanation B was *somewhat easier* to understand": 4, "5. Explanation B was *much easier* to understand": 5, } return str(mapping.get(choice, -1))