How to output average grade in python

爱喝马黛茶的安东尼
Release: 2019-08-02 13:42:31
Original
9981 people have browsed it

How to output average grade in python

The first step is to open the local python IDE tool and create a new python file named test6.py.

How to output average grade in python

How to output average grade in python

How to output average grade in python

##Related recommendations: "

Python Video Tutorial"

The second step is to define an average that prompts the user to enter how many numbers to calculate.

How to output average grade in python

The third step is to initialize the value of sum. Note that it is a good coding practice to give an initial value when defining a variable.

How to output average grade in python

#The fourth step is to loop through the numbers to be calculated and calculate the sum value.

How to output average grade in python

The fifth step is to calculate the average and output it. Use the "sum/quantity" formula to calculate the average.

How to output average grade in python

The sixth step, after the coding is completed, remember to save and then debug and run. Press the F5 key or click "run"->"run model" in the menu bar to run the program.

How to output average grade in python

How to output average grade in python

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!