Completed triangles.py