Skip to content

Conversation

@budhadityabanerjee
Copy link

Text problem says:
Write a function that takes a list or tuple of numbers. Return a two-element list, containing (respectively) the sum of the even-indexed numbers and the sum of the odd-indexed numbers. So calling the function as even_odd_sums([10, 20, 30,40,50,60]), you’ll get back[90,120].

Current solution does not look at index; rather looks at whether number itself is odd or even.

Budhaditya Banerjee and others added 2 commits April 9, 2021 12:39
@eguar11011
Copy link

I agree with this, the solution is not using slides. This change is quite good, slides are used here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants