generate functionSun, 05 Mar 2023

Return the average of a string with some numbers inside

def get_average(x): total = 0.0 for i in x: total += i return total/len(x) get_average([1,2,3,4])

Questions about programming?Chat with your personal AI assistant