title: Sum Series 0 6 0 06 0 006 0 0006 N Terms
signature: sumSeries06006000600006NTerms(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return (actual - expected).abs() < 1e-09;
  }
  
  String driver(n, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          1, 
          0.5994)
      }");
  
      print("TEST-1...${driver(
          2, 
          0.65934)
      }");
  
      print("TEST-2...${driver(
          3, 
          0.665334)
      }");
  
      print("TEST-3...${driver(
          4, 
          0.6659334)
      }");
  
      print("TEST-4...${driver(
          5, 
          0.6659933400000001)
      }");
  
      print("TEST-5...${driver(
          74, 
          0.666)
      }");
  
      print("TEST-6...${driver(
          77, 
          0.666)
      }");
  
      print("TEST-7...${driver(
          67, 
          0.666)
      }");
  
      print("TEST-8...${driver(
          9, 
          0.665999999334)
      }");
  
      print("TEST-9...${driver(
          12, 
          0.665999999999334)
      }");
  
      return 0;
  }
source_py: def sum_series_0_6_0_06_0_006_0_0006_n_terms(n):
      return (0.666 * (1 - (1 / pow(10, n))))
source_cpp: float sum_series_0_6_0_06_0_006_0_0006_n_terms(int n) {
    return ( 0.666 ) * ( 1 - 1 / pow ( 10, n ) );
  }