Question: PYTHON: Write a function that takes, as an argument, a positive integer n, and returns the sum of the digits of the number. Name this
PYTHON: Write a function that takes, as an argument, a positive integer n, and returns the sum of the digits of the number. Name this function addDigits(n). For example, addDigits(322) should return the value 7.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
