Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created December 18, 2019 09:54
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/f017a40ff8df1a0432681a122db5f587 to your computer and use it in GitHub Desktop.
Save codecademydev/f017a40ff8df1a0432681a122db5f587 to your computer and use it in GitHub Desktop.
Codecademy export
#Write your function here
def over_nine_thousand(lst):
sum1 = 0
for i in lst:
sum1 += i
while sum1 > 9000:
break
return sum1
if sum1<= 9000:
return sum1
while len(lst)==0:
break
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