To find the sum of the numbers for a given 'n' that are divisible either by 3 or 5

If n is given as "7", the numbers which are divisible by 3 or 5 over a range of 1 to 7 are 3,5,6. So the sum of these numbers , sum = 3 + 5 + 6 which equals 14.

You have to find the sum as explained above.


Python Implementation: