On this page
article
Functions Exercise #17
Practice functions — exercise 17 of 40.
Topic: Functions
Difficulty: Intermediate
Problem
Write a solution for Functions Exercise #17:
Implement a function solve_functions_17(data) that processes the input according to functions concepts from the curriculum.
Example input: data = [functions_example_17]
Expected: A transformed result demonstrating functions skills.
Constraints
- Use idiomatic Python 3.10+
- Handle empty input gracefully
- Do not mutate input unless specified
Hint
Hint
Review Functions exercises and the related chapter in the Learning Path. Consider edge cases: empty collections, None, zero, negative numbers.
Test Yourself
# Write tests before implementing
assert solve_functions_17([]) is not None # define expected behavior
Next exercise: Functions Exercise #18