Question: def differenceofSum ( n . m ) The function takes two integrals m and n as arguments. You are required to obtain the total of

def differenceofSum(n.m)
The function takes two integrals m and n as arguments. You are required to obtain the total of all integers ranging between 1 to n(both inclusive) which are not divisible by m. You must also return the distinction between the sum of integers not divisible by m with the sum of integers divisible by m.
Assumption
m>0 and n>0
Sum lies within the integral range
Example
input:
m=6
n=30
Output:
285
Integers divisible by 6 aht 5,12,18:24, and 30. Their sum is 90
20,21,22,23,25,26.27.28 and 29 theh sum 3975.
The difference between them is 285335-901
 def differenceofSum(n.m) The function takes two integrals m and n as

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!