lab challenge
Python Challenge: Accumulate
Difficulty: Beginner
Duration: Up to 20 minutes
Students: 516
Rating: 3.2/5
Get challenged in a real environmentProve your skills in a real-world, provisioned environment.
Push your limitsComplete an unguided mission within the time limit.
See resultsTest your problem-solving skills and track your progress.
Description
In this challenge, you will put your knowledge of the Python programming language to the test by implementing the accumulate
operation, which, given a collection and an operation to perform on each element of the collection, returns a new collection containing the result of applying that operation to each element of the input collection.
Given the collection of numbers:
- 1, 2, 3, 4, 5
And the operation:
- square a number (
x => x * x
)
Your code should be able to produce the collection of squares:
- 1, 4, 9, 16, 25
Check out the test suite to see the expected function signature.
Prerequisites
- Knowledge of Python 3
Intended audience
- Beginner Python developers
What will be assessed
- Your ability to write Python code within a time-limited environment
Covered topics
Mission
Python Challenge