Total alternating clip durations

An editor stores five clip durations in seconds. The Python loop below totals selected clips. What value does it print? Give the total in seconds, to zero decimal places.


Python
durations = [12, 7, 15, 8, 11]
total = 0
for i in range(1, len(durations), 2):
    total = total + durations[i]
print(total)

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More enumerate Questions: