Question: IN PYTHON!! Question 3: Count characters Your task is to write a function that takes in a character and a string and retruns the count

IN PYTHON!!
Question 3: Count characters Your task is to write a function that takes in a character and a string and retruns the count of how many times that character appears in the string. Write python code to do the following: - Define a function called count_characters which takes two arguments, a character c, and a string s - Your function should loop through the string and character by character, counting every time the character c is encountered - Return the total count, or if the character c is not part of string s Your code replaces the prompt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
