Aluko Kenny

Generation

generate functionSat, 13 May 2023

Sum and average of 5 numbers

def sum_and_avg(a, b, c, d, e): total = a + b + c + d + e avg = total / 5 return (total, avg) (s, a) = sum_and_avg(1, 2, 3, 4, 5) print("The sum is %d and the average is %f." % (s, a))

Questions about programming?Chat with your personal AI assistant