Skip to content

Instantly share code, notes, and snippets.

@codecademydev

codecademydev/script.py Secret

Created Aug 7, 2020
Embed
What would you like to do?
Codecademy export
#Write your function here
def max_num(nums):
largest = 0
for x in nums:
if x > largest:
largest = x
else:
return largest
#Uncomment the line below when your function is done
print(max_num([50, -10, 0, 75, 20]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment