# rec_dig_sum python

You will write two functions in this challenge. First write a function called rec_dig_sum that takes in an integer and returns the recursive digit sum of that number.Examples of recursive digit sums:
101 => 1+0+1 = 2
191 => 1+9+1 = 11 => 1+1 = 2
5697 => 5+6+9+7 = 27 => 2+7 = 9Then use that function within another function called distr_of_rec_digit_sums, that returns a dictionary where the keys are recursive digit sums, and the values are the counts of those digit sums occurring between a low and high (inclusive) range of input numbers. Assume low and high are positive integers where high is greater than low, and neither low nor high are negative. Your function should return a dictionary, not just print it.You can test your code as many times as you need. Your code will save if you need to come back later.
Question 2Write a function called sigmoid that implements the sigmoid logistic function, as it is shown in this article.For the value of Euler’s number e use 2.71828.Your function should return a number, not just print that number.
Write a function called sigmoid that implements the sigmoid logistic function, as it is shown in this article.For the value of Euler’s number e use 2.71828.Your function should return a number, not just print that number.

×
New Download