answering the questions

User Generated

Anvsss

Programming

Description

please answer the questions in the file as soon as possible

Unformatted Attachment Preview

Joy and Beauty of Data, First Practicum – February 24, 2017 Name _______________________________________________________________ Question One. 25 points. Show a list with as few elements as possible where the median function returns a different answer than the median_low function. Both functions are in the statistics module. Question Two. 25 points. Write a function named count_characters. The function receives a list of strings. It should return the total number of characters contained in all strings. For example, the following statement should print 20 print(count_characters(["You", "may", "say", "I'm", "a", "dreamer"])) Question Three. 25 points. Write a function named my_reverse. The function receives a list of strings. It should return the list in reverse order without using the built-in reverse function. For example, the following statement should print ['dreamer', 'a', "I'm", 'say', 'may', 'You'] print(my_reverse(["You", "may", "say", "I'm", "a", "dreamer"])) Question Four. Complete the function below such that it creates a file that contains each integer from 1 through n on successive lines of the output file. For example, create_file(“jbd.txt”, 5) should create a file named “jbd.txt” that contains 1 on the first line, 2 on the second line, 3 on the third line, 4 on the fourth line, and 5 on the fifth line. def create_file(file_name, n):
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags