title: Count Characters Position English Alphabets
signature: function countCharactersPositionEnglishAlphabets(str: string): number {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(str: string, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(str),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver("lLkhFeZGcb", 0);
    console.log(`TEST-0...${result}`);
  
    result = driver("ABcED", 3);
    console.log(`TEST-1...${result}`);
  
    result = driver("geeksforgeeks", 1);
    console.log(`TEST-2...${result}`);
  
    result = driver("Alphabetical", 3);
    console.log(`TEST-3...${result}`);
  
    result = driver("abababab", 2);
    console.log(`TEST-4...${result}`);
  
    result = driver("bcdefgxyz", 0);
    console.log(`TEST-5...${result}`);
  
    result = driver("cBzaqx L", 1);
    console.log(`TEST-6...${result}`);
  
    result = driver(" bcd", 3);
    console.log(`TEST-7...${result}`);
  
    result = driver("11", 0);
    console.log(`TEST-8...${result}`);
  
    result = driver("MqqKY", 0);
    console.log(`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;
  }