I am giving a list and a random value as an input ex:
Main.counter([15, 30, 60, 15], 15)
The expected result should be 15, As there are 2 instances of 15 in the list.
I want to achieve this by not using any built in functions.
I want to help in iterating over a list with multiple elements…