Question: 
Write a python function to count characters at same position in a given string (lower and uppercase characters) as in english alphabet.


Model's Code:
def count_char_position(s):
    count = 0
    for i, char in enumerate(s):
        if char.isalpha() and (ord(char.lower()) - ord('a') == i):
            count += 1
    return count



Sample Correct Code:
def count_char_position(str1): 
    count_chars = 0
    for i in range(len(str1)):
        if ((i == ord(str1[i]) - ord('A')) or 
            (i == ord(str1[i]) - ord('a'))): 
            count_chars += 1
    return count_chars 


Asserts:
assert count_char_position("xbcefg") == 2
assert count_char_position("ABcED") == 3
assert count_char_position("AbgdeF") == 5


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 165 of 974: 120/165 (72.72727272727273%): success