python exercise:
a. Write a function sumDigits that takes a positive integer valueand returns the
total sum of the digits in the integers from 1 to that numberinclusive.
b. Write a program to input an integer n and call the abovefunction in part a if n
is positive, else give ‘Value must be Positive’ message.
sample:
Enter a positive integer: 1000000
The sum of the digits in the number from 1 to 1000000 is27000001
Enter a positive integer: -642
Value must be Positive
it asks the sum of the digits such as 21+22=7