Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created June 19, 2020 13:25
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/9e564aab9ad9bf618d4b5a4d2c9282ed to your computer and use it in GitHub Desktop.
Save codecademydev/9e564aab9ad9bf618d4b5a4d2c9282ed to your computer and use it in GitHub Desktop.
Codecademy export
#Write your function here
def over_nine_thousand(lst):
sum1=0
for number in lst:
sum1+=number
if sum1>9000:
break
return sum1
if (sum1<9000):
return sum1
else:
return 0
#Uncomment the line below when your function is done
print(over_nine_thousand([8000, 900, 120, 5000]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment