Question: 
Write a function to count occurrence of a character in a string.


Model's Code:
def count_char(s, c):
    return s.count(c)



Sample Correct Code:
def count_char(string,char):
 count = 0
 for i in range(len(string)):
    if(string[i] == char):
        count = count + 1
 return count


Asserts:
assert count_char("Python",'o')==1
assert count_char("little",'t')==2
assert count_char("assert",'s')==2


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

Test 666 of 974: 499/666 (74.92492492492492%): success