-
-
Save codecademydev/9e564aab9ad9bf618d4b5a4d2c9282ed to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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