Question: The purpose of this question is to write a program that counts the number of the elements in an entered list and return back the

 The purpose of this question is to write a program that

The purpose of this question is to write a program that counts the number of the elements in an entered list and return back the element, number of occurrence and the indices that occurrence happens. For this purpose, first user should enter a list and your program must search that list element by element. You must only use basic commands like for and if to write the answer of this question. It means that you are not allowed to use any special function for this question. To answer this question, write a function that first ask the user to enter the length of an optional list. Then, grabs the elements of the list one by one. def grabList( Afterwards, then write another function that search inside that list element by element def listSearch0: In this function if an element is occurred more than one time, it should be recognized by the program and increase its frequency of occurrence. Also, the code should be able to save all the indices of occurrences of a specific element and show it in the output. All these functions can be called either in a main 0 function or in a main code body. Note: Pay attention to the plural s'at the end of the time. If the element occurs only once we use singular word time. Enter the length of the list: 4 Enter element 1: 12 Enter element 2:2.4 Enter element 3: a Enter element 4: 2.4 The final list is: [12,2.4,a,2.4] The element 12 occurs 1 time at e. The element 2.4 occurs 2 times at 1,3. The element a occurs 1 time at 2. Programmed by Stew Dent. Date: Sat Jan 21 88:15:22 2019 End of processing Test your program using different lists with different lengths and elements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!