Well within the next few weeks we will dive into all sorts of languages but the first one is a little something Scratch called Scratch.
在未来的几个星期,我们将接触各种程序语言,第一个就是。
So really, the rule of thumb if you think back to Scratch is -- that any time you write a statement -- -- something that does something in one line of code -- you generally need the semicolon there.
实际上,根据经验,你们回忆一下在Scratch中,任何时候你们写一条语句-,处理一些操作的一行代码-,你们通常需要在那里加个分号。
So when scratch blocked terms, I'd have a four loop or like a forever loop or something and then another one inside.
当scratch阻塞了,我用一个for循环,或者一个永久循环之类的东西,然后另一个在里面。
Another one might be "wait one second" which is another building block or puzzle piece and scratch.
另一条语句可能是“wait,one,second“,这条语句组成块或者片。
And in Scratch did you probably see the key word "and" on one of the blocks.
在Scratch中,你们大概看到那个关键字,“and“在其中一个程序块中。
Here, print F, recalls a statement and just like in scratch, statements were these one-liners.
这里,printf,召回了一个语句,像在scratch中,语句是这些单行方式的。
> So this was a Scratch project submitted by one of last year's students.
>,这是由去年一个学生完成的,一个Scratch项目。
> So this tune made by one of our former students; but it doesn't have to be something written in Scratch, it doesn't have to be a game or animation it can simply be an incredibly, wonderfully way to spend time.
这段是由以前的学生制作的;,不一定非要用Scratch编写,也不一定必须是个游戏或动画,它只不过是用来打发时间的,一个好办法。
As an aside, if you ever just have one line of code that you want to execute, one puzzle piece in Scratch terminology, ; you actually don't need the curly braces; you only need the curly braces if you have two or more lines of code that you want to execute if that condition is true.
此外,如果你只有一行代码,需要执行,在Scratch,术语中叫做,一句代码,你就不需要使用花括号了;,如果那个条件成立,你有两行或更多行的代码时需要执行时,你就需要花括号。
应用推荐