from statistics import mean from fractions import Fraction as fr d1 = (11, 3, 4, 5, 7, 9, 2) d2 = (-1, -2, -4, -7, -12, -19) d3 = (-1, -13, -6, 4, 5, 19, 9) d4 = (fr(1, 2), fr(44, 12), fr(10, 3), fr(2, 3)) d5 = {1: "one", 2: "two", 3: "three"} # Only keys are used print("Mean d1:", mean(d1)) print("Mean d2:", mean(d2)) print("Mean d3:", mean(d3)) print("Mean d4:", mean(d4)) print("Mean d5:", mean(d5))