title: Count Characters Position English Alphabets
signature: func countCharactersPositionEnglishAlphabets(str string) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(str string, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(str),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver("lLkhFeZGcb", 0)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver("ABcED", 3)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver("geeksforgeeks", 1)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver("Alphabetical", 3)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver("abababab", 2)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver("bcdefgxyz", 0)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver("cBzaqx L", 1)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(" bcd", 3)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver("11", 0)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver("MqqKY", 0)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }