PYTHON!!! Write a function sum_of_digits(a,b), that takes two arguments a and b, computes a to the power of b, then recursively finds the sum of digits until there is only one digit left. You must...


PYTHON!!!


Write a function sum_of_digits(a,b), that takes two arguments a and b, computes a to the power of b, then recursively finds the sum of digits until there is only one digit left. You must PRINT all steps of the process as shown in the below example. sum_of_digits(5,3) will PRINT on the screen the following: 5^3 = 125 = 1 + 2 + 5 = 8 sum_of_digits(2,8) will PRINT on the screen the following: 2^8 = 256 = 2 + 5 + 6 = 13 = 1 + 3 = 4



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here