Write a Python function named countV1 which will calculate the number of occurrences of a character...
Fantastic news! We've Found the answer you've been seeking!
Transcribed Image Text:
Write a Python function named countV1 which will calculate the number of occurrences of a character c in a string s. Try two versions: • with
the count method of class str; and name your function accountV1 • without this method (using a while or for loop); and name your function
countV2 • Develop the main part of the program which obtains from the user a string named s, and calls the function (both versions) to
calculate the number of 'a's. The last part should be:?
Answer rating: 100% (QA)
Here s a Python program that includes two versions of the countV1 function to count the number of oc...View the full answer