這關要在一個循環裏面使用另一個循環,這叫個「巢狀循環(nested loop)」。在“for b in bananas”裏面使用一個“for c in crocodiles”。而“for c in crocodiles”要寫在“turnTo b”之前。試試能不能做到!
We need to write a loop inside a loop, it calls “Nested Loop” (a loop exists inside the body of another loop). Write a “for c in crocodiles” inside “for b in bananas”. “for c in crocodiles” should run before “turnTo b”. Let try!
看看程式是如何運行的:
Let see how the codes run: