Question: write in python code 3 version The relative frequency of a letter in a string is the number of times that the letter appears in
write in python code 3 version
The relative frequency of a letter in a string is the number of times that the letter appears in the string divided by the total number of letters in the string. Note that this is always a number between 0 and 1. Write a function max_relative_frequency (s) which takes as argument a string and returns the highest relative frequency of any letter in the string. This value is unique. There can be several letters that occur with an equal (highest) frequency, but in that case their relative frequency is the same. Consider only letters of the English alphabet (that is, 'a' through 'z'). For the purpose of counting occurrences, consider letters that differ only by case to be the same letter. For example, the letter 'n' occurs three times in the string "Non-even" (once in upper case, twice in lower case). For the purpose of counting the total number of letters in the string, count only letters. For example, the string" 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
