Write a python program to find the frequency of a number in a list.





count= 0


n=int(input( "Enter the number of elements in the list: " ))


for i in range(n):

    list1.append(int(input( "Enter element: " )))


search=int(input( "Enter the number to check frequency of: " ))


for i in range(n):


        count=count+ 1


print("Frequency of ",search," is: ",count)


Question 3 Long Answer.jpg

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.