Calcule a média aritmética em Python

Calcule a média aritmética em Python

O termo média aritmética é a média dos números. A fórmula matemática para determinar a média aritmética é dividir a soma dos números pela contagem. É determinado em Python das seguintes maneiras. Use a fórmula matemática. Use a função mean () das bibliotecas padrão do Python, como NumPy, statistics, scipy. Use a fórmula matemática para calcular a média aritmética em Python Siga este programa para usar a fórmula matemática. listnumbers = [1, 2, 4] print("The mean is =", sum(listnumbers) / len(listnumbers)) Resultado:

Tags

Python Operator Python String Python Bytes Python Print Python Input Python Dictionary Python Function Python Math Python List Python Variable Python JSON Python DateTime Python File Python Integer Python Loop Python Array Python Set Python Float Python Tuple Python Exception Python Class Python Number Python Directory Python Path Python Installation Python Hex Python CSV

Artigos mais populares

Artigos atualizados recentemente