Created
January 30, 2019 04:45
-
-
Save Tevinthuku/acd9a91298304b927491879d3c8c6894 to your computer and use it in GitHub Desktop.
Create a function that returns the sum of the two lowest positive numbers given an array of minimum 4 integers. No floats or empty arrays will be passed.
This file contains 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 sum_two_smallest_numbers(numbers): | |
return sum(sorted(numbers)[:2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment