• So the open curly brace followed by the closed curly brace means everything inside of these curly braces should get executed, but only if that first condition is actually true.

    所以左花括号后面跟着,右花括号,这意味着花括号里面所有的代码,都应该是要被执行的,但只有当第一个条件是正确的。

    哈佛公开课 - 计算机科学课程节选

  • You can say if this is true, then go and do the following pieces of code or puzzle pieces that are inside this part of the block, else go ahead and do these that are down here.

    你可以说如果条件成立,执行下面的代码段,或板块中的拼图,否则跳过去执行这下面的语句。

    哈佛公开课 - 计算机科学课程节选

  • If you want to make sure both conditions are true and they both have to be true for any code to be executed, use ampersand ampersand.

    如果你想保证两个条件都成立,或者它们两个都必须为真值,才能执行一些代码,那就使用“&&“

    哈佛公开课 - 计算机科学课程节选

  • 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,术语中叫做,一句代码,你就不需要使用花括号了;,如果那个条件成立,你有两行或更多行的代码时需要执行时,你就需要花括号。

    哈佛公开课 - 计算机科学课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定