moves testing into python, appropriately or not...
[swc-testing-nose.git] / python / testing / mean.py
diff --git a/python/testing/mean.py b/python/testing/mean.py
new file mode 100644 (file)
index 0000000..c04a0f1
--- /dev/null
@@ -0,0 +1,10 @@
+def mean(numlist):
+    try:
+        total = sum(numlist)
+        length = len(numlist)
+    except ValueError:
+        print "The number list was not a list of numbers."
+    except:
+        print "There was a problem evaluating the number list."
+    return total/length
+