Skip to content
CodeItRaw
Code Reading
/
Did the Account Go Negative?
Path
Play
Daily
Leaderboard
tr
Break the Code
Did the Account Go Negative?
Write a list for which this function gives the wrong answer.
1
def
went_negative
(amounts):
2
balance =
0
3
for
a
in
amounts:
4
balance += a
5
return
balance <
0