Home >Backend Development >Python Tutorial >python calculate average
Prompts the user to enter the average of how many numbers to calculate
Initialize the value of the sum sum
Loop to input the number to calculate the average, and calculate the value of the sum
Finally, calculate the average and output it, using " The formula of "Sum/Quantity" calculates the 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!