Question: Define function called percentage, given a string and a character, return the percentage of number of appearances of the character to the total number of
Define function called percentage, given a string and a character, return the percentage of number of appearances of the character to the total number of characters of the string. In main function, call the function on string "abcdab", and a Note that alphabetic characters are casesensitive so a is different from A Examples: If the input string is "abcBba", and the character is b return If the input string is ab and the character is a return If the input string is "abcdf', and the character is e return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
