Question: The programming language of this question is python. question: Write a function that gets a string representing a file name and a list. The function
The programming language of this question is python.
question:
Write a function that gets a string representing a file name and a list. The function writes the content of the list to the file. Each item in the list is written on one line. Name the function WriteList. If all goes well the function returns true, otherwise it returns false.
Write another function, RandomRange that takes an integer then it returns a list of length n, where n is an integer passed as an argument, and the numbers in the list are random numbers in the range 1 to n inclusive. Assume that n > 0. For example, if the user enters 50, the RandomRange returns 50 numbers where each number is randomly generated that is >= 1 and <= 50.
Then write code for main, to get the the first input for the RandomRange function then gets the input needed for the WriteList, then call the function. Call main.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
