Question: Implement a function that prints the mean, median, minimum and maximum values of the list of unitig lengths. Print also the number of unitigs, and
Implement a function that prints the mean, median, minimum and maximum values of the list of unitig lengths. Print also the number of unitigs, and the total length of all unitigs. Hint: use the Python package statistics, and the Python built-in functions min(list), max(list) and sum(list). A unitig is a a short DNA sequence containing A, C, G, and T. Sense the data is not numerical, I'm having issues construction the code. The data "unitigs" contain 7905 unitigs off different lengths.
This is the code I am supposed to work with and complete the code based on this code. Hopefully somebody could help med complete this code.
import statistics
def print_basic_statistics(unitigs): mean = 0 median = 0 minimum = 0 maximum = 0 totalLength = 0 # Your code here ... print('Mean unitig length:', mean) print('Median unitig length:', median) print('Min unitig length:', minimum) print('Max unitig length:', maximum) print('Number of unitigs:', len(unitigs)) print('Total length of unitigs:', totalLength)
print_basic_statistics(unitigs)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
