title: Area Of A Hexagon
signature: function areaOfAHexagon(s: number): number {
source_py: def area_of_a_hexagon(s):
      return (((3 * math.sqrt(3)) * (s * s)) / 2)
source_cpp: double area_of_a_hexagon(double s) {
    return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
  }
question_info.test_list: [{"idx": 0, "outputs": 8163986.207300422, "inputs": {"s": 1772.6589509256596}}, {"idx": 1, "outputs": 934487.9989101035, "inputs": {"s": -599.737107809315}}, {"idx": 2, "outputs": 2997804.1448343466, "inputs": {"s": 1074.1765931782}}, {"idx": 3, "outputs": 3632345.696441302, "inputs": {"s": -1182.4087746714795}}, {"idx": 4, "outputs": 169746524.38794258, "inputs": {"s": 8083.035797247716}}, {"idx": 5, "outputs": 97513471.98905805, "inputs": {"s": -6126.414356565494}}, {"idx": 6, "outputs": 74922068.46663411, "inputs": {"s": 5370.057504189614}}, {"idx": 7, "outputs": 125386010.4299519, "inputs": {"s": -6947.020794285176}}, {"idx": 8, "outputs": 11572495.990484647, "inputs": {"s": 2110.5107873533325}}, {"idx": 9, "outputs": 108379966.88267714, "inputs": {"s": -6458.751326919488}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return Math.abs(actual - expected) < 1e-09;
  }
  
  function driver(s: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(s),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(1772.6589509256596, 8163986.207300422);
    console.log(`TEST-0...${result}`);
  
    result = driver(-599.737107809315, 934487.9989101035);
    console.log(`TEST-1...${result}`);
  
    result = driver(1074.1765931782, 2997804.1448343466);
    console.log(`TEST-2...${result}`);
  
    result = driver(-1182.4087746714795, 3632345.696441302);
    console.log(`TEST-3...${result}`);
  
    result = driver(8083.035797247716, 169746524.38794258);
    console.log(`TEST-4...${result}`);
  
    result = driver(-6126.414356565494, 97513471.98905805);
    console.log(`TEST-5...${result}`);
  
    result = driver(5370.057504189614, 74922068.46663411);
    console.log(`TEST-6...${result}`);
  
    result = driver(-6947.020794285176, 125386010.4299519);
    console.log(`TEST-7...${result}`);
  
    result = driver(2110.5107873533325, 11572495.990484647);
    console.log(`TEST-8...${result}`);
  
    result = driver(-6458.751326919488, 108379966.88267714);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: areaOfAHexagon
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js