Python Simple Statistics
Simple statistics
There are a number of simple statistics you can run on a list containing numerical data.
There are a number of simple statistics you can run on a list containing numerical data.
#Finding the minimum value in a list ages = [93, 99, 66, 17, 85, 1, 35, 82, 2, 77] youngest = min(ages) #Finding the maximum value ages = [93, 99, 66, 17, 85, 1, 35, 82, 2, 77] oldest = max(ages) #Finding the sum of all values ages = [93, 99, 66, 17, 85, 1, 35, 82, 2, 77] total_years = sum(ages) print(total_years)
No comments:
Post a Comment