Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions