Computer Science, asked by Hulkkav, 1 month ago

Write a program to search an element in the given list of numbers and count it’s frequency. Also print appropriate message if the element is unique. ( Python3 is the language to be used )

Answers

Answered by sujatasah740
1

Answer:

Given an unsorted list of some elements(may or may not be integers), Find the frequency of each distinct element in the list using a dictionary.

Example:

Input : [1, 1, 1, 5, 5, 3, 1, 3, 3, 1,

4, 4, 4, 2, 2, 2, 2]

Output : 1 : 5

2 : 4

3 : 3

4 : 3

5 : 2

Explanation:

Here 1 occurs 5 times, 2

occurs 4 times and so on...

Similar questions