diff options
author | mjfernez <mjfernez@gmail.com> | 2020-02-16 16:42:23 -0500 |
---|---|---|
committer | mjfernez <mjfernez@gmail.com> | 2020-02-16 16:42:23 -0500 |
commit | 64c113b89b96b1cbdec8ba6b3323aeff77ca0c85 (patch) | |
tree | 3f877d934a27ee12fc40e01b6f7b17b2f22e659c /06-Sum-Square-Difference/sumsq.py | |
parent | d21e516c4ec3ab5b85f52df9aa7daa7f020b5f7b (diff) | |
download | Project_Euler_Solutions-64c113b89b96b1cbdec8ba6b3323aeff77ca0c85.tar.gz |
Added sumsq.c. Fixed pyhton solution for the same
Diffstat (limited to '06-Sum-Square-Difference/sumsq.py')
-rw-r--r-- | 06-Sum-Square-Difference/sumsq.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/06-Sum-Square-Difference/sumsq.py b/06-Sum-Square-Difference/sumsq.py index fdd43e4..6882eb6 100644 --- a/06-Sum-Square-Difference/sumsq.py +++ b/06-Sum-Square-Difference/sumsq.py @@ -10,14 +10,11 @@ import PIL import math -nums = range(1, 11) -numsq = range(1, 11) +nums = range(1, 101) +numsq = [] for i in nums: - i = i*i - -print(nums) -print(numsq) + numsq.append(i*i) sum1 = (sum(nums)**2) sum2 = (sum(numsq)) |