組別及編號 Array Indexing

第五行的指令與第二行一樣都是 “step distanceTo”。不過我們要“step distanceTo banana[0]”還是“step distanceTo banana[1]”?
The fifth line of code is same to the second line of code, both are using “step distanceTo”. What object we need to “step distanceTo”? “step distanceTo banana[0]” or “step distanceTo banana[1]”?
答案 Answer↓↓
第一至五行指令是對的,請參照第四及五行指令來續寫第六及七行指令。
The first to fifth lines of code are correct. Please reference the fourth and fifth line of code to complete the sixth and seventh lines of code.
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓
試參照第一及二行指令來續寫,完成程式。
Reference the first and second lines of code to complete the program.
答案 Answer↓↓
第一、二、五及六行程式都是對的。試參照第一及二行指令,利用“bushes[1]”來編寫第三及四行指令。
The first, second, fifth and sixth lines of code are correct. Reference the first and second lines of code with using “bushes[1]” to complete the third and fourth lines of code.
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓
這一關我們認識了一個新朋友海狸(beaver)。牠們會幫猴子渡河。請參照第一行指令來完成第二行指令。
We meet a new friend – beaver! It will help monkey cross the river. Reference the first line of code to complete the second line of code.
答案 Answer↓↓
指示beavers[2]向前行13步!
Lead beavers[2] step 13 forward.
答案 Answer↓↓
指示beavers[2]向前行!
Lead beavers[2] step forward!
答案 Answer↓↓
先指示beavers[1]向前行!於第六行指令裏指示猴子走向banana[1]。
Lead beavers[1] step forward first. Lead monkey step to banana[1] in the sixth line.
答案 Answer↓↓
先指示海狸走向需要牠們的位置,再收集香蕉。
Lead beavers to go to the right place before catch bananas.
答案 Answer↓↓
海狸要分兩次慢慢向前移動!
Beavers should step twice in this challenge!
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓