--- title: 17.不固定次數迴圈的說明與實作 tags: python基礎語法與應用, 筆記 --- # 17.不固定次數迴圈的說明與實作 ## 迴圈 - 固定 - 不固定 --- ``` times = 0 result = 0 end = 50 # 加到>50才停,你最後加的數字是多少 while result<= end: result = result + (times +1) times =times +1 print("最後加的是", times) >最後加的是 10 ``` # END
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up