Question: 2 . Write a function addNumsInRange, which returns the sum of the numbers within a given range of numbers. code in python For example: range

2. Write a function addNumsInRange, which returns the sum of the numbers within a given range of numbers.
code in python
For example:
range as 1 to 4, it should print value of 10 because 1+2+3+4=10
range as 50 to 100, it should print value of 3825 because 50+51+52+...+75+...+90+99+100=3825

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!