summaryrefslogtreecommitdiff
path: root/Problem6.py
diff options
context:
space:
mode:
authorJoshua Drake <joshua.drake@ditchwitch.com>2023-04-07 08:13:49 -0500
committerJoshua Drake <joshua.drake@ditchwitch.com>2023-04-07 08:13:49 -0500
commit1161f9a034de06a63538e3a9a0b7717098c744d9 (patch)
tree55bb842b2daa4f096eb7916a8d3630426fc1c376 /Problem6.py
Initial CommitHEADmaster
Diffstat (limited to 'Problem6.py')
-rw-r--r--Problem6.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Problem6.py b/Problem6.py
new file mode 100644
index 0000000..78d7958
--- /dev/null
+++ b/Problem6.py
@@ -0,0 +1,11 @@
+def sumofsquares(n):
+ sum = 0
+ for x in range(1,n+1):
+ sum+=(x*x)
+ return sum
+def squareofsum(n):
+ sum = 0
+ for x in range(1,n+1):
+ sum+=x
+ return (sum*sum)
+print(squareofsum(100) - sumofsquares(100))