def print_list(x): if x == []: #base case return first = x[0] print(first) rest = x[1:] print_list(rest) def print_list1(x): if x == []: #base case return first = x[0] rest = x[1:] print_list1(rest) print(first) def cattle_prod(x): """prec: x is a numerical list postc: returns the product of the entries in x""" if x == []: return 1 first = x[0] rest = x[1:] return first * cattle_prod(rest) print(cattle_prod([1,2,3,4,5,6,7])) print_list1(["garret's", "reputation", "is", "on", "the", "line"])