id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > sumOddIndices
prev  |  next  |  chance

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)

def sumOddIndices(data):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy