“Jak użyć funkcji, aby znaleźć średnią w Pythonie” Kod odpowiedzi

Średnia wartość elementów listy w Pythonie

# Example to find average of list
number_list = [45, 34, 10, 36, 12, 6, 80]
avg = sum(number_list)/len(number_list)
print("The average is ", round(avg,2))
Comfortable Cow

Jak użyć funkcji, aby znaleźć średnią w Pythonie

 avreage_cost = cost
    avg = sum(avreage)/len(avreage) 
    print("The average amout you spent is ", round(avg,2))
Open Ostrich

Odpowiedzi podobne do “Jak użyć funkcji, aby znaleźć średnią w Pythonie”

Pytania podobne do “Jak użyć funkcji, aby znaleźć średnią w Pythonie”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu