Question: An arbitrary triangle can be described by the coordinates of its three vertices: (x1, y1), (x2, y2), (x3, y3), numbered in a counterclockwise direction.

An arbitrary triangle can be described by the coordinates of its three

An arbitrary triangle can be described by the coordinates of its three vertices: (x1, y1), (x2, y2), (x3, y3), numbered in a counterclockwise direction. The area of the triangle is given by the formula, %33 - x3y2 xly3 + x3yl +xly2 - x2y1 A = Write a function getTriangleArea (vertices) that returns the area of a triangle whose vertices are specified by the argument vertices, which is a nested list of the vertex coordinates.

Step by Step Solution

3.47 Rating (137 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem well write a function getTriangleAreavertices that calculates the area of a tr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!