Home >Backend Development >Python Tutorial >python calculate average

python calculate average

王林
王林Original
2020-05-08 09:36:218570browse

python calculate average

Prompts the user to enter the average of how many numbers to calculate

python calculate average

Initialize the value of the sum sum

python calculate average

Loop to input the number to calculate the average, and calculate the value of the sum

python calculate average

Finally, calculate the average and output it, using " The formula of "Sum/Quantity" calculates the average

python calculate average

Recommended tutorial: python tutorial

The above is the detailed content of python calculate average. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn