title: Count Characters Position English Alphabets
signature: function countCharactersPositionEnglishAlphabets($str) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($str, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($str), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        "lLkhFeZGcb", 
        0));
      
      printf("TEST-1...%s\n",driver(
        "ABcED", 
        3));
      
      printf("TEST-2...%s\n",driver(
        "geeksforgeeks", 
        1));
      
      printf("TEST-3...%s\n",driver(
        "Alphabetical", 
        3));
      
      printf("TEST-4...%s\n",driver(
        "abababab", 
        2));
      
      printf("TEST-5...%s\n",driver(
        "bcdefgxyz", 
        0));
      
      printf("TEST-6...%s\n",driver(
        "cBzaqx L", 
        1));
      
      printf("TEST-7...%s\n",driver(
        " bcd", 
        3));
      
      printf("TEST-8...%s\n",driver(
        "11", 
        0));
      
      printf("TEST-9...%s\n",driver(
        "MqqKY", 
        0));
      
  }
  
  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;
  }