TORONTO KIDS COMPUTER CLUB | Friday 17:00 Python Practice 21.03.05.
19135
post-template-default,single,single-post,postid-19135,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Friday 17:00 Python Practice 21.03.05.

08 Mar Friday 17:00 Python Practice 21.03.05.

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.

No Comments

Sorry, the comment form is closed at this time.