LearnPy Hub
← Arena
IntermediateRating 1300

Polygon Area

Print the area of a simple polygon whose vertices are given in order, with 1 decimal (shoelace formula).

Input

n, then n lines 'x y'.

Output

An area.

Sample 1

Input
4
0 0
4 0
4 3
0 3
Output
12.0

Sample 2

Input
3
0 0
1 0
0 1
Output
0.5
solution.py
Output appears here
Polygon Area · Python Arena problem · LearnPy Hub