Computer Science, asked by Sipundash1247, 8 months ago

Q3 Write definition of a method/function HowMany(ID,Val) to count and display the number of times the value of Val is present in the list ID. 3 For example : If the ID contains [115,122,137,110,122,113] and Val contains 122 The function should display 122 found 2 Times

Answers

Answered by AaronE
5

Idk

Explanation:

Maybe ask Google they prove correct ans

Answered by saiprasad12ckmnss
5

Answer:

def HowMany(ID ,Val):

   count = 0

   for i in ID:

       if i == Val:

           count = count + 1

   print(count)

l = [115,122,137,110,122,113]

va = 122

HowMany(l,va)

Explanation:

this is the python code for the following que

Similar questions