15 Apr Aurora Monday 18:30 Python Homework 22.04.11.
Question 1:
Use recursion to write a function divides_all
that consumes a list of positive integers seq
and a positive integer factor
. Your function should produce True
if every item in seq
is a multiple of factor
and False
otherwise. The helper function is_multiple
has been provided for you.
Question 2:
Use recursion to write a function reverse
that consumes a list seq
and produces a new list with the same items as seq
but in reverse order. A list of length zero or one is its own reverse.
Sorry, the comment form is closed at this time.