Skip to content

Instantly share code, notes, and snippets.

@jumasheff
Created May 12, 2018 08:27
Show Gist options
  • Select an option

  • Save jumasheff/795ff37cf6d77217518ce6ec6cb4636d to your computer and use it in GitHub Desktop.

Select an option

Save jumasheff/795ff37cf6d77217518ce6ec6cb4636d to your computer and use it in GitHub Desktop.
def mult_odd(array):
"""
sums odd-indexes elements and multiply at the last
"""
some_result = 0
return some_result
if __name__ == '__main__':
assert mult_odd([0, 1, 2, 3, 4, 5]) == 45, "(1+3+5)*5=45"
assert mult_odd([1, 3, 5]) == 15, "(3)*5=15"
assert mult_odd([6]) == 0, "Тизмекте бир эле элемент бар = 0"
assert mult_odd([]) == 0, "Тизмек бош = 0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment