Question: Python Write a function sumInc(m, n, D) which adds up the values in the series m + (m + D) + (m + 2D) +

Python

Write a function sumInc(m, n, D) which adds up the values in the series m + (m + D) + (m + 2D) + ...+ Y, where Y is the greatest value in the series which is still less than n. For example, sumInc(3, 10, 3) is 3 + 6 + 9 = 18, and sumInc(3, 15, 6) is 3 + 9 = 12, and sumInc(1, 100, 1) is 1 + 2 + 3 + ... + 99 = 4950. After writing your function, use it to find sumInc(2, 2000, 13)

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!