Compose Score Transformation Functions

Apply named transformations to each numeric score in the given order: double multiplies by 2, negate changes its sign, and square multiplies it by itself. Use functions with map/reduce or equivalent composition. Return None for any unknown step; no steps returns the original values as a list. Use only small scores whose results remain finite JSON numbers.

Difficulty: intermediate

Examples

  • [[2,-3],["double","square","negate"]][-16,-36]

Your solution

Python

Results

Python starts when you run or submit this challenge.

Back to Lesson