summaryrefslogtreecommitdiff
path: root/mit/assertion.py
diff options
context:
space:
mode:
Diffstat (limited to 'mit/assertion.py')
-rw-r--r--mit/assertion.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mit/assertion.py b/mit/assertion.py
new file mode 100644
index 0000000..a196067
--- /dev/null
+++ b/mit/assertion.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python3
+
+def avg(grades):
+ assert not len(grades) == 0, 'no grades data'
+ return sum(grades) / len(grades)
+
+def fodeu():
+ a = 7 / 0
+ return a