Find the Area of a (Regular) Hexagon

Published by 11level360 in

Given the side length x find the area of a hexagon.

Formula to find the area of a hexagon

Examples

area_of_hexagon(1) ➞ 2.6

area_of_hexagon(2) ➞ 10.4

area_of_hexagon(3) ➞ 23.4

Notes

  • Return None if the side length given is not a positive integer.
  • Round to the nearest tenth.
Watch a quick demo on how Edabit works.