close

#while not (A == 50) 一直做直到A=50

A = 0
sum = 0
while not (A == 50):
    A = A+(1)
    sum = sum + A
    print(A,sum)

用 python 寫程式:從1加到50(while not)

用 python 寫程式:從1加到50(while not)

用 python 寫程式:從1加到50(while not)

用 python 寫程式:從1加到50(while not)

arrow
arrow
    文章標籤
    迴圈 python
    全站熱搜
    創作者介紹
    創作者 鄭正正 的頭像
    鄭正正

    鄭正正

    鄭正正 發表在 痞客邦 留言(0) 人氣()