變量谷 Variable Valley

x是一個變量。我們要把10還是20儲存在x裏?
x is a variable. What number we need to save in x? 10 or 20?
答案 Answer↓↓
只需要改改儲存在x中的數值,整個程式就可以順利運行了。
We only need to change the number in x, so the program can run smoothly.
答案 Answer↓↓
只需要改改儲存在x中的數值,整個程式就可以順利運行了。
We only need to change the number in x, so the program can run smoothly.
答案 Answer↓↓
“d = 120”及循環的指令是正確的。試想想要存入t及x的正確數值是甚麼。
“d = 120” and the codes inside the loop are correct. What numbers that we need to save in t and x?
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓
我們只需在第一行指令裏,將一個數值儲存在x中,整個程式就可以運行了。
We only need to save a number in x in the first line, so the program can run smoothly.
答案 Answer↓↓
“x = 15” 是對的。但是循環的次數好像有點少,而且循環裏亦少了烏龜行動的指令。
“x = 15” is correct. But times of loop is not enough also lack of turtle codes inside the loop.
答案 Answer↓↓
我們用say “ ”教會猴子說話,嚇走老鼠,再走向香蕉。
We can use say” ” to make monkey speak and drive out the mice. Then catch the banana.
答案 Answer↓↓
“x = 20” 及 “step x” 都是正確的。不過say的指令缺少了“ ”,亦缺少要猴子面向香蕉的指令。
“x = 20” and “step x” are correct. But it miss a ” ” in the say code. It also miss a code that make monkey face to banana.
只要在say” “內寫下不同的句子,猴子便可以說不同的話:
We can write different sentence in say ” “, so monkey can speak different sentence.
答案 Answer↓↓
第39關開始,我們學會了“distanceTo”*。在這裏應該“distanceTo turtle”還是“distanceTo banana”?
Start from challenge 39, we learn “distanceTo”*. It should be “distanceTo turtle” or “distanceTo banana”?
“distanceTo”一樣物件,例如:step distanceTo banana,電腦就會自動計算猴子與香蕉的距離,並走向香蕉。
“distanceTo” an object, such as “step distanceTo banana”. Computer will count the distance between monkey and banana automatically and step to the banana.
答案 Answer↓↓
第一及第三行的指令都是對的。想想我們儲存了「烏龜與香蕉的距離」的數值在x裏,我們要怎麼做才能讓烏龜到達香蕉?
The first and the third line are correct. If we saved “the distance between turtle and banana” then how we lead turtle to go to banana?
答案 Answer↓↓
第一行的指令中,我們“distanceTo”的對像是草“bush”還是“monkey”?第二至四行的指令都是對的,試續寫第五行指令。
What is the object that we use “distanceTo” in the first line? It should be “bush” or “monkey”? The second to fourth lines of code are correct. Please code in the fifth line to complete the program.
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓
這裏缺少了第一行指令,試試用“turnTo”完成程式。
The first line of code is missing. Try to use “turnTo” to complete the program.
答案 Answer↓↓
這關是否似曾相識?在第12關也有類似的場景出現。“turnTo banana”前遺漏了二行指令。
Do you remember this scene? It is very similar to challenge 12. Two lines of code are missing before “turnTo banana”.
答案 Answer↓↓
小心別讓猴子掉進河裏。試用say、turnTo、distanceTo來完成程式。
Watch out! Do not let monket drop into the river. Try to use “say”, “turnTo” and “distanceTo” to complete the program.
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓
“turnTo banana”前遺漏了三行指令。試試用say、turnTo、distanceTo來完成程式。
There are 3 lines missing before “turnTo banana”. Try to use “say”, “turnTo” and “distanceTo” to complete the program.
答案 Answer↓↓
5加多少等於10?更改第四行的數值來完成程式。
How much should 5 add until equal 10? Please fix the number in fourth line to complete the program.
答案 Answer↓↓
4、8、12、16之間有甚麼關連?更改第六行的數值來完成程式。
What is the relationship between 4, 8,12 and 16? Please fix the number in sixth line to complete the program.
答案 Answer↓↓
8、12、16、20、24之間有甚麼關連?循環的次數足夠嗎?續寫第五行的指令來完成程式。
What is the relationship between 8, 12, 16, 20 and 24? Is the times of loop enough? Please fix the fifth line to complete the program.
答案 Answer↓↓
20、17、14、11之間有甚麼關連?除了“d = d + 3”外,也可以 “d = d – 3”。試試用“4.times ->”、step、turn及“d = d – 3” 來完成程式。
What is the relationship between 21, 17, 14, 11? Apart from “d = d + 3”, we can also use “d = d – 3”. Try to use “4.times ->” , step, turn and “d = d – 3” to complete the program.
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓
6、8、10之間有甚麼關連?試試用 turtle.step d來完成程式。
What is the relationship between 6, 8 and 10? Try to use “turtle.step d” to complete the program.
看看程式是如何運行的:
Let see how the codes run:
答案 Answer↓↓