Question: Write a Python program, in a file called RecurFrequency.py, that includes the following functions: createList, a function that generates and returns a list of size

Write a Python program, in a file called RecurFrequency.py, that includes the following functions:

createList, a function that generates and returns a list of size 20 with each element of the list initialized with random numbers between 1 and 10

frequency, a recursive function that returns the number of times a given number occurs in the lis

a main function to test your two functions

For example, with the following input prompt and input, the output from the program should be as follows:

Enter an integer (1 to 10) to count its frequency in a random list: 5 The list of random numbers is: [10, 6, 9, 8, 1, 8, 10, 5, 8, 4, 7, 4, 8, 2, 10, 6, 5, 4, 4, 6] 5 occurs 2 times in the given list.

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!