title: Find Harmonic Mean Using Arithmetic Mean Geometric Mean
signature: find_harmonic_mean_using_arithmetic_mean_geometric_mean <- function(a, b) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      abs(actual - expected) < 1e-09
  }
  
  driver <- function(a, b, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(a, b), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          54L, 83L, 
          65.43065693430657
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          42L, 56L, 
          48.0
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          63L, 12L, 
          20.16
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          19L, 76L, 
          30.4
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          41L, 50L, 
          45.054945054945065
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          7L, 26L, 
          11.030303030303031
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          39L, 42L, 
          40.444444444444436
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          11L, 64L, 
          18.773333333333333
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          96L, 81L, 
          87.86440677966101
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          15L, 54L, 
          23.47826086956522
      )))
  
  }
  
  main()
source_py: def find_harmonic_mean_using_arithmetic_mean_geometric_mean(a, b):
      AM = ((a + b) / 2)
      GM = math.sqrt((a * b))
      HM = ((GM * GM) / AM)
      return HM
source_cpp: double find_harmonic_mean_using_arithmetic_mean_geometric_mean(int a, int b) {
    double AM, GM, HM;
    AM = ( a + b ) / 2;
    GM = sqrt ( a * b );
    HM = ( GM * GM ) / AM;
    return HM;
  }