We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 975579c commit 2cb02fbCopy full SHA for 2cb02fb
1 file changed
python-built-in-exceptions/average.py
@@ -0,0 +1,4 @@
1
+def average_grade(grades):
2
+ if len(grades) == 0:
3
+ raise ValueError("empty grades not allowed")
4
+ return sum(grades) / len(grades)
0 commit comments