2015-10-22 HW11

posted Oct 22, 2015, 4:58 AM by Samuel Konstantinovich   [ updated Oct 22, 2015, 5:49 AM ]
Goal: List Recursion

Together:
Count the number of the values of a list. 
Sum of the values of a list of numbers without any sub lists.

HW11 Print a copy and bring tomorrow to class: (test it in racket of course...)
Write the function (countEven L) -> returns the number of even numbers inside of a list L, L must contain only integers, and can have 0 or more elements. There are no sublists.
Write the function (sumOfEven L) -> returns the sum of all of the even numbers inside of a list L. L must contain only integers, and can have 0 or more elements. There are no sublists.

Comments