…What’s the sum of an empty list?
And, if you’ve already determined that the total sum is at least 9000, do you need to test again whether it’s less than 9000?
Doesn’t it say OVER 9000? You seem to accept equal as well
I’m pointing out a whole lot of really obvious stuff that you’re very capable of reasoning about - most of the mistakes here come from doing reasoning that you’re already great at, but you’re doing it after you’ve already written it. If you reason out what should happen before writing it then those ideas are still in a form where you know exactly how to deal with them
You might for example start by writing out what should happen in plain english. yes it’s a bit silly but also forces you to go through it and mainly I only say write because that’s the easiest way to explain it, the important thing is thinking it through first
turns out we humans are pretty good at doing these manually, so that’s something you can use to process the problem before you move on to unfamiliar territory (code)