title: Python Program Find Perimeter Circumference Square Rectangle
signature: function python_program_find_perimeter_circumference_square_rectangle(a)
source_py: def python_program_find_perimeter_circumference_square_rectangle(a):
      return (4 * a)
source_cpp: int python_program_find_perimeter_circumference_square_rectangle(int a) {
    return 4 * a;
  }
question_info.entry_fn_name: python_program_find_perimeter_circumference_square_rectangle
question_info.entry_cls_name: Solution
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return isCorrect(actual,expected)
  end
  
  function driver(a, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(a) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver(98, 392)
      print(string.format("TEST-0...%s",result))
  
      result = driver(9, 36)
      print(string.format("TEST-1...%s",result))
  
      result = driver(18, 72)
      print(string.format("TEST-2...%s",result))
  
      result = driver(38, 152)
      print(string.format("TEST-3...%s",result))
  
      result = driver(84, 336)
      print(string.format("TEST-4...%s",result))
  
      result = driver(8, 32)
      print(string.format("TEST-5...%s",result))
  
      result = driver(39, 156)
      print(string.format("TEST-6...%s",result))
  
      result = driver(6, 24)
      print(string.format("TEST-7...%s",result))
  
      result = driver(60, 240)
      print(string.format("TEST-8...%s",result))
  
      result = driver(47, 188)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.test_list: [{"idx": 0, "outputs": 392, "inputs": {"a": 98}}, {"idx": 1, "outputs": 36, "inputs": {"a": 9}}, {"idx": 2, "outputs": 72, "inputs": {"a": 18}}, {"idx": 3, "outputs": 152, "inputs": {"a": 38}}, {"idx": 4, "outputs": 336, "inputs": {"a": 84}}, {"idx": 5, "outputs": 32, "inputs": {"a": 8}}, {"idx": 6, "outputs": 156, "inputs": {"a": 39}}, {"idx": 7, "outputs": 24, "inputs": {"a": 6}}, {"idx": 8, "outputs": 240, "inputs": {"a": 60}}, {"idx": 9, "outputs": 188, "inputs": {"a": 47}}]