title: Count Characters Position English Alphabets
signature: count_characters_position_english_alphabets <- function(str) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(str, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(str), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          "lLkhFeZGcb", 
          0L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          "ABcED", 
          3L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          "geeksforgeeks", 
          1L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          "Alphabetical", 
          3L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          "abababab", 
          2L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          "bcdefgxyz", 
          0L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          "cBzaqx L", 
          1L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          " bcd", 
          3L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          "11", 
          0L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          "MqqKY", 
          0L
      )))
  
  }
  
  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;
  }