Computer Science, asked by syedimram786, 4 months ago

write a program to find the occurrence of a given element in tuple python ​

Answers

Answered by Anonymous
0

Algorithm. countoccur(A,x) /* A is an array and x is the element to count the number of occurrences */ Step 1: First we use one counter variable which is count the same element. Step 2: Then traverse the tuple. Step 3: Then check x with every element of the tuple.

Answered by srnroofing171711
1

Answer:

===>Countoccur (A,x)*/A is an array and X is the the element to count the number of occurrences.

Explanation:

===>step 1: first we use one counter variable which is count the same element.

===>step 2:then traverse the tuple.

===>step 3: then check x with every element of the tuple.

Similar questions