Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions