an equilateral triangle t 2 is formed by joining the mid points of the sides of another equilateral triangle t 1 . a third equilateral triangle t 3 is formed by joining the mid - points of t 2 and this process is continued indefinitely . if each side of t 1 is 40 cm , find the sum of the perimeters of all the triangles .
n0 = 2.0
n1 = 1.0
n2 = 3.0
n3 = 2.0
n4 = 1.0
n5 = 40.0
t0 = n5 + n5 + n5  # perimeter of a triangle
answer = t0 + t0
print(answer)