Question: help with this code please, thank you! 1. Write a function sum_squares(vals) that takes as input a list of numbers vals and uses recursion to
help with this code please, thank you!
1. Write a function sum_squares(vals) that takes as input a list of numbers vals and uses recursion to compute and return the sum of the squares of the individual numbers in the list. For example: sum_squares ([2,5,3]) should recursively compute 22+55+33 and return the resulting value of 38 . Here are two more examples: \$ sum_squares ([1,2,3,4]) result: 30 result: 100 If the list is empty, the function should return 0 : \$> sum_squares () result: 0 Write a function count_bu(s) that takes as input a string of 0 or more lower-case letters and uses recursion to compute and return the total number of times that the letters ' b ' and ' u ' appear in s. For You may assume that the string is composed of only lower-case letters
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
