Starting from:

$34.99

CS104 Homework 07 Solution



  Please check the code given below. Please list down three things can go wrong here. Modify the code so that it can handle those errors and keeps on asking for the proper inputs until submitted.



  Please implement a recursive function pow which accepts an integer base and exponent and returns the base raised to that exponent. Example: pow(3, 4) returns 81.

  Please implement a recursive function sum_recursively that takes a list and sums its content. Example: sum_recursively([19, 5, 6]) returns 30.

  Please check the Luhn algorithm implementation from Recursion Lecture Notes (slides 67-69). Please implement 10 assertions that assesses the functions and special cases in this implementation.

More products