Home >Backend Development >Python Tutorial >How to find the average in python
Python method to calculate the average: first create a new python file; then initialize the value of the sum; then loop the input number to calculate the average, and calculate the value of the sum; finally use "sum/quantity" The formula can be used to calculate the average.
The operating environment of this article: Windows 7 system, python3.5 version, Dell G3 computer.
First of all, let’s take a look at the IPO model for calculating the average.
Input: The number to be entered for calculating the average.
Processing: average algorithm
Output: average
After understanding the IPO mode of the program, we open the local python IDE tool and create a new python file, Name it test6.py.
python video tutorial]
The above is the detailed content of How to find the average in python. For more information, please follow other related articles on the PHP Chinese website!