< Back

Most Frequent Character

Write a function called most_frequent(text) that has a single string parameter, text. The function should return the character that occurs most times in the specified text. Assume that text has at least one character and that there is only one character that occurs the most times.