Created
November 6, 2017 18:15
-
-
Save ysnerdem/722175b319d96432b68cf507cd79e3fe to your computer and use it in GitHub Desktop.
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
numbers = [-2, 5, 16, 21, -21, 1] | |
def Find_max(list): | |
if len(list) == 1: | |
return list[0] | |
else: | |
max = Find_max(list[1:]) | |
return max if max > list[0] else list[0] | |
print(Find_max(numbers)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment