Skip to content

moein-rumee/Python_array_sum_of_even_indexed_numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Python_array_sum_of_even_indexed_numbers

Let's imagine you've discovered a list of intergalactic treasures represented by integers in an array arr. Now, you've got a peculiar rule out here in the cosmos: you can only pick up the treasures located at the even indexes in that array! Now, being a smart space explorer, you want to find out the net worth of all these even-indexed treasures.

So, here's your mission: craft a Python function recursiveSumEven that accepts your list-of-integers treasure array as a parameter and returns the sum of all those even-indexed treasures. And since this is the cosmos and peculiar rules rule, you'll need to calculate this sum recursively!

This function will be tested with different-sized lists, including ones with 0 elements, so do consider the edge cases! Sail high, space champion! Remember, the answer is always in the journey.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published