Now just to get used to the conventions, 0 because this is the program you'll use not for problems at 0 but for 1 to start writing programs, notice at the top in this window just reminds you what you're working on.
我们要入乡随俗,习惯这样的界面,因为这是你们将要用到的程序,不是为习题集0,而是0,而是为习题集1开始写程序的,注意窗口顶部,这是用来提醒你,你工作在何种环境。
And you'll see at the bottom, bug it says the first actual case of a bug being found.
然后程序就正常工作了,因此这就是第一个被发现的。
So we can provide any form of input here and the program will just keep working.
为您提供各种形式的输入,程序也一直工作。
So how do chess-playing programs, and particularly the best chess-playing programs, how do they work? Well, they play chess the same way you do.
那么,下棋程序,特别是最好的下棋程序,是如何工作的呢,它们的下棋方式同你们如出一辙
You had a whole team of people trying to figure out how to do arctans.
一整个团队的人都为这个程序工作者,他们试着运行这个程序。
So we can feel pretty comfortable that it's doing something good with that.
所以我们感觉很棒,程序工作正常。
That is not the way chess-playing programs work.
但国际象棋的程序并不是这样工作的
It turns out that in a lot of languages, C included, you the programmer knowing a bit about how the computer works and the language works, can exercise more fine-grained control.
结果在包括C语言的很多语言当中,你作为一个程序员懂得了一些计算机的工作方式,和语言的处理方式,可以更精确地控制运用它。
The beauty of this is, it keeps me from getting lazy, and not only testing my program and the thing that found the bug, but in all the things that used to work.
运行函数而不用再输入了,这其中的,美妙之处在于,它让我变的勤快了点,并不是仅仅的去测试程序发现bug方面,同样适用于那些正常工作的模块。
That's how chess-playing programs work as well.
下棋程序也是这样工作的
You're not going to start for the rest of your life if you ever need to solve a problem with a computer from scratch, odds are you're going to reach for some off the shelf packages or libraries or tools that other people wrote so that people like us don't have to reinvent the wheel again and again.
如果你想用Scratch来解决问题,却使用其他人写的程序,或者利用现成的资料或工具,这样以来,我们的确可以避免做重复性的工作,但却永远学不会编程。
应用推荐