find average marks in python

preview_player
Показать описание
Absolutely, finding the average of a set of marks or grades in Python is a common task. Here's a step-by-step tutorial along with a code example:
Firstly, let's collect the marks or grades from the user. You can do this in various ways, such as manually entering the grades or collecting them through user input.
After collecting the marks, we need to calculate their average. To find the average, add up all the marks and divide the sum by the total number of subjects.
Finally, let's display the average mark to the user.
Here's the complete Python code that brings these steps together:
Let's say you input marks for three subjects (80, 75, and 90):
This code will allow you to find the average mark for any number of subjects input by the user.
Feel free to customize this code according to your specific needs or implement error handling to enhance its robustness!
ChatGPT
Рекомендации по теме
visit shbcf.ru