title: Sum Series 0 6 0 06 0 006 0 0006 N Terms
signature: def sumSeries06006000600006NTerms(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Double , expected: Double): Boolean = {
      (actual - expected).abs < 1e-09
  }
  
  def driver(n: Int, expected: Double): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        1, 
        0.5994    
      )}")   
  
  
      println(s"TEST-1...${driver(
        2, 
        0.65934    
      )}")   
  
  
      println(s"TEST-2...${driver(
        3, 
        0.665334    
      )}")   
  
  
      println(s"TEST-3...${driver(
        4, 
        0.6659334    
      )}")   
  
  
      println(s"TEST-4...${driver(
        5, 
        0.6659933400000001    
      )}")   
  
  
      println(s"TEST-5...${driver(
        74, 
        0.666    
      )}")   
  
  
      println(s"TEST-6...${driver(
        77, 
        0.666    
      )}")   
  
  
      println(s"TEST-7...${driver(
        67, 
        0.666    
      )}")   
  
  
      println(s"TEST-8...${driver(
        9, 
        0.665999999334    
      )}")   
  
  
      println(s"TEST-9...${driver(
        12, 
        0.665999999999334    
      )}")   
  
  }
  
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 ) );
  }