Step:

■プログラムの説明

5個のリスト a の数値で負の値があるまで、数値の合計を変数 s に求める

a =[5,3,6,-1,9]
s = 0
for i in a:
    if i > 0:
        break
    s += i
print("s=",s)