Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 15, 2021 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/1d3a259d9b11d82574c28c649765f5d8 to your computer and use it in GitHub Desktop.
Save codecademydev/1d3a259d9b11d82574c28c649765f5d8 to your computer and use it in GitHub Desktop.
Codecademy export
def max_num(nums):
largest_num = 0
for i in nums:
if i > largest_num:
largest_num = i
return largest_num
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