Complete the function listchk that takes a numerical list alist and a number n as the input.
Fantastic news! We've Found the answer you've been seeking!
Question:
Complete the function listchk that takes a numerical list alist and a number n as the input. Starting with index 0, the function checks every other value in alist (that is, only the elements with even indices) to see if it is less than the input value n. A new list is returned that consists of all values contained in alist with even indices that are less than the input value n.
Related Book For
Data Structures and Algorithm Analysis in Java
ISBN: 978-0132576277
3rd edition
Authors: Mark A. Weiss
Posted Date: