Add code fences and attribution for q1.md
Add python solution for q1.