Python Simple Statistics - Web Development and Design | Tutorial for Java, PHP, HTML, Javascript Python Simple Statistics - Web Development and Design | Tutorial for Java, PHP, HTML, Javascript

Breaking

Post Top Ad

Post Top Ad

Thursday, December 6, 2018

Python Simple Statistics

Python Simple Statistics

Simple statistics

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)

Screenshot 

 

No comments:

Post a Comment

Post Top Ad