Respuesta :

Answer:

def count_occurrences(e, d):

   count = 0

   for checker in e:

       if (checker == 4):

           counter = 1

   return counter

   

print count_occurrences("elephant","e")

Explanation:

It'ss the one I got so far. Hope! you can fix it .

The program is an illustration of loops.

Loops are used to perform repetitive operations.

The keeping count program in Python, where comments are used to explain each line is as follows:

#This defines the function

def count_occurrences(e, d):

#This initializes count to 0

    count = 0

#This iterates through the characters of e

    for checker in e:

#If the current character equals character d

         if (checker == d):

#The counter is incremented y 1

              count = 1

#This returns the counter to main

    return count

   

Read more about similar programs at:

https://brainly.com/question/20565167