You've got a loop, you've got a condition and a boolean to check if he's touching the edge, and some statements to tell him to shout or to actually turn around.
我们有一个循环,通过一个条件和一个布尔值来判断,是否触到了边缘,还有一些语句,让它回头并咆哮。
I actually need to check the second order condition.
实际上我们还需要验证二阶条件
So conceptually the key difference here, besides the syntax looking slightly different, it just means that if you want a chunk of code to execute no matter what initially, ; you can use the do while loop; if you want to check a condition first, you can use the while loop.
所以概念上,则关键的区别是,除了语法看起来有点不同,它的意思是如果你想要一段代码,最初无论如何都要执行,你就可以用do,while循环;,如果你想要先检查条件,你可以用while循环。
So how do I check the second order condition?
怎样验证二阶条件呢
I differentiate a second time and check the sign, so the second order condition, I differentiate this expression again with respect to q1.
我们对它进行二次求导然后看符号,这个式子的二阶导数,就是一阶导数再对q1进行求导
应用推荐