Skip to content

Instantly share code, notes, and snippets.

@codecademydev codecademydev/script.py Secret
Created Dec 18, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.