Write a Python function, add_digits, that sums the digits of a 3-digit integer number. Function add_digits should
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a Python function, add_digits, that sums the digits of a 3-digit integer number. Function add_digits should have one parameter, n, a positive integer with 3 digits, and return the sum of the digits of n.
For example,
>>> add_digits(123) 6
>>> add_digits(101) 2
Related Book For
Posted Date: