about | help | code help+videos | done | prefs |
ReplaceNegative
ReplaceNegative(nums) will take a list of numbers, and modify it in the following way: All negative numbers are replaced with that number multiplied by -2. Return that modified list. ReplaceNegative([0, 1, 2, 3, 4]) → [0, 1, 2, 3, 4] ReplaceNegative([0, -1, -2, -3, -4]) → [0, 2, 4, 6, 8] ReplaceNegative([8, 6, 7, 5, 3, 0, 9]) → [8, 6, 7, 5, 3, 0, 9] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy