課程 4 - 計數迴圈 簡介
-
0:05 - 0:10當您使用重複塊循環代碼時
計算機如何知道何時重複 -
0:10 - 0:16足夠的次數了?重複塊實際上
隱藏了更複雜的代碼 -
0:16 - 0:22這個代碼叫做for循環,是從初始
值按照一定增量增直到特定的最終值 -
0:22 - 0:31例如,從1到3按照增量為1重複3個方塊的計數
每次計數時, -
0:31 - 0:36它會在循環內運行代碼。for循環
知道它已經運行了多少次了 -
0:36 - 0:40因為它使用了計數器變量,設置為
循環開始時的值,並包含 -
0:40 - 0:44每次循環都會增加增量。
一旦計數器變量是 -
0:44 - 0:51大於結束值,循環停止
運行。使用實數for循環 -
0:51 - 0:55而不是重複塊的好處是,你可以
實際看到計數器變量並使用 -
0:55 - 0:56它在您的循環中。
- Title:
- 課程 4 - 計數迴圈 簡介
- Description:
-
Twitter 工程師 Jie Jin 為你介紹計數迴圈
有空逛逛 http://code.org/
隨時和我們聯繫!
• on Twitter https://twitter.com/codeorg
• on Facebook https://www.facebook.com/Code.org
• on Instagram https://instagram.com/codeorg
• on Tumblr https://blog.code.org
• on LinkedIn https://www.linkedin.com/company/code-org
• on Google+ https://google.com/+codeorg - Video Language:
- English
- Team:
Code.org
- Project:
- CSF '21-'22
- Duration:
- 0:57
![]() |
TranslateByHumans edited Chinese, Traditional subtitles for Course 4: Intro to For Loops | |
![]() |
TranslateByHumans edited Chinese, Traditional subtitles for Course 4: Intro to For Loops | |
![]() |
奕德 余 edited Chinese, Traditional subtitles for Course 4: Intro to For Loops | |
![]() |
奕德 余 edited Chinese, Traditional subtitles for Course 4: Intro to For Loops | |
![]() |
奕德 余 edited Chinese, Traditional subtitles for Course 4: Intro to For Loops |