Aug-25-2019, 07:11 PM
(Aug-25-2019, 10:42 AM)perfringo Wrote: There are some ambiguity (what does mean separated by four) but sum of every forth integer in range n should be simply:
>>> n = 100 >>> sum(i ** 2 for i in range(1, n+1, 4)) 80825
Can you help me fix the code implementing range as you told me?
If is not much of a problem...
Thanks!