[Tutor] Help with this question

Alan Gauld alan.gauld at yahoo.co.uk
Mon Feb 27 20:16:13 EST 2017


On 27/02/17 22:00, Johnny Hh wrote:
> write a python function called find_most_freq() that returns the element of
> a given list that occurs the most frequently. If there are ties, take the
> number found first.

OK, You've shown us the exercise, now show us your attempt at a solution.

Here is a starter:

def find_most_freq():
    # your code here
    return element

Now show us how you think you fill that in. Or tell us where
and how you are stuck.



-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list