Update triangle.py