summaryrefslogtreecommitdiff
path: root/comp/work/4/sumAndMean
diff options
context:
space:
mode:
Diffstat (limited to 'comp/work/4/sumAndMean')
-rwxr-xr-xcomp/work/4/sumAndMean6
1 files changed, 6 insertions, 0 deletions
diff --git a/comp/work/4/sumAndMean b/comp/work/4/sumAndMean
new file mode 100755
index 0000000..1d46136
--- /dev/null
+++ b/comp/work/4/sumAndMean
@@ -0,0 +1,6 @@
+#!/usr/bin/python3
+numbers = []
+for i in range(5):
+ numbers.append(int(input(f"num {i}: ")))
+print(f"sum = {float(sum(numbers))}")
+print(f"average = {(sum(numbers) / 5)}")