Odd Position Sum
ABC 403Problem 13 of 50
EasyWhat to do
You have a list of numbers, and you need to add up the numbers that are in the odd positions, like the 1st, 3rd, 5th, etc. The task is to find the total of these numbers.
Key Concepts
lists
loops
basic math
input/output
Examples
Input:
[3, 1, 4, 1, 5, 9, 2]
Output:
14
Input:
[100]
Output:
100
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...