Derive an python function named count


Problem

Derive an Python function named count that will derive the number of occurrences of a character cin achain s. Try 2 versions: with the method count of the str class and without that it (use a loop while or for). Develop the main part of the program that gets from the user a character chain named s, and call the function twice to get the number of 'a'. The last part should be:

print(count(s, 'a'))

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Derive an python function named count
Reference No:- TGS03323567

Expected delivery within 24 Hours