about | help | code help+videos | done | prefs |
Write a function sumOddIndices(data) which takes a list and returns the sum of the elements at odd index. You may assume data is a list of integers or strings. sumOddIndices([1, 2, 3, 4, 5]) → 6 sumOddIndices([1, 1, 1, 1, 1]) → 2 sumOddIndices([2, 4, 6, 8, 10]) → 12 ...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