i wrote this code in python:
list=[3,5,7,6,-9,5,4]
i=0
total=0
while i<len(list) and list[i] > 0:
total+=list[i]
i+=1
print(total)
and instead of getting the total of all positive numbers i only get the total of numbers that are located before the negative one, i'm not sure what i'm doing wrong, this is just my fourth code in python i'd like some help^^