Created
May 12, 2018 08:27
-
-
Save jumasheff/795ff37cf6d77217518ce6ec6cb4636d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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