Mathematics
Logic
m_t = ((10, 10, 10, 12), (30, 45, 56, 45), (81, 80, 39, 32), (1, 2, 3, 4)) def average(t): return [sum(i) / len(i) for i in zip(*t)] print(f"\nAverage value: {average(m_t)}")
my_tuple = ((10, 10, 10, 12), (30, 45, 56, 45), (81, 80, 39, 32), (1, 2, 3, 4))- m_t = ((10, 10, 10, 12), (30, 45, 56, 45), (81, 80, 39, 32), (1, 2, 3, 4))
def average(tuples):return [sum(i) / len(i) for i in zip(*tuples)]- def average(t):
- return [sum(i) / len(i) for i in zip(*t)]
print(f"Average value: {average(my_tuple)}")- print(f"
- Average value: {average(m_t)}")