title: Count Characters Position English Alphabets
signature: fun countCharactersPositionEnglishAlphabets(str: String): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(str: String, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(str), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver("lLkhFeZGcb", 0)
      println("TEST-0...${result}")
      
      result = driver("ABcED", 3)
      println("TEST-1...${result}")
      
      result = driver("geeksforgeeks", 1)
      println("TEST-2...${result}")
      
      result = driver("Alphabetical", 3)
      println("TEST-3...${result}")
      
      result = driver("abababab", 2)
      println("TEST-4...${result}")
      
      result = driver("bcdefgxyz", 0)
      println("TEST-5...${result}")
      
      result = driver("cBzaqx L", 1)
      println("TEST-6...${result}")
      
      result = driver(" bcd", 3)
      println("TEST-7...${result}")
      
      result = driver("11", 0)
      println("TEST-8...${result}")
      
      result = driver("MqqKY", 0)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def count_characters_position_english_alphabets(str):
      result = 0
      for i in range(len(str)):
          if ((i == (ord(str[i]) - ord('a'))) or (i == (ord(str[i]) - ord('A')))):
              result += 1
      return result
source_cpp: int count_characters_position_english_alphabets(string str) {
    int result = 0;
    for ( int i = 0;
    i < str . size ( );
    i ++ ) if ( i == ( str [ i ] - 'a' ) || i == ( str [ i ] - 'A' ) ) result ++;
    return result;
  }