Lab 6 — Practice with `for` loops and lists
Date: October 20, 2026
Skills: 4
For all of these problems, first implement them with a for loop (so, use #level intermediate). Afterwards, implement them a second time with map or filter (without changing any variables). For some, it should be possible with just a single call to map or filter -- but for others you may need to also use other functions (like len).
- Design a function
absolute_valuesthat takes a list of numbers and returns a new list where each number has been converted to its absolute value (useabs). - Design a function
exactly_three_charsthat takes a list of strings and returns a new list containing only the strings that have exactly 3 characters. - Design a function
all_eventhat takes a list of numbers and returnsTrueif every number in the list is even,Falseotherwise. - Design a function
count_in_rangethat takes a list of numbers, a minimum value, and a maximum value, and returns how many numbers in the list are between the min and max (inclusive).