summaryrefslogtreecommitdiff
path: root/progs/a698.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a698.py')
-rw-r--r--progs/a698.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/progs/a698.py b/progs/a698.py
new file mode 100644
index 0000000..47b03c5
--- /dev/null
+++ b/progs/a698.py
@@ -0,0 +1,3 @@
+def ap_sum(a,n,d):
+ total = (n * (2 * a + (n - 1) * d)) / 2
+ return total \ No newline at end of file