Question: Write a function called sum.digits ) that takes a single argument, a positive integer up to five digits long (i.e., between 0 and 99999), and

Write a function called sum.digits ) that takes a single argument, a positive integer up to five digits long (i.e., between 0 and 99999), and returns its sum. For example, for 5378 the sum is 5 + 3 + 7 + 8 = 23, Your output should look like the following: 1 >>> sum digits (5378) 2 23 >sum digits (1) s >sum digits (11) 7 > 9 >sum digits (11113) sum digits (111) 10 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
