The cookies were going back and forth and back and forth and the hearts up and down, well, this thing that we had that called a loop last week with a forever block with a statement inside of it is simply gonna look a little something like this.
这些饼干人来来回回的移动,还有这些爱心们上上下下地漂浮,都用到我们上周提到过的循环结构,当然还有个声明在里面,就有点像屏幕上,显示的这样。
You have a nice grid pattern and you can use a city block metric to add up the number of blocks between people's doors.
整个城市呈格网状,你可以数数,人们相隔多少个街区。
Having reached the end of the block, go back up and check the test.
执行到了这块代码的最后,程序会回去再做一次测试。
Well, this block here on the left that I came counter counter=0 up with arbitrarily sets a variable called counter equal to 0 and then it forever says that counters value 1 and then it changes the counter by 1.
大家看一下左边的这一段代码,其中有一个随便定义的变量,它会一直显示counter的值,每显示一次,counter加。
So, what you do is you set up a couple of displays, one where the block is stopped, the other one where you take this away with a trap door and it keeps going.
所以,你可以设计几个演示,一个是木块被挡住了,另一个是用活门把木块挪开,使得屏板继续上升
应用推荐