But imagine I actually wanted to gather them together. I wanted to collect them, so I could do something with them.
把那些除数都显示出来,这很有用,但是请想想下我想要,把它们放在一块。
It looks like we're cut off the screen a little bit here, but you can see I've just circled it there.
看起来我们屏幕的边缘部分有些没显示,但是大家可以看到我刚才把它圈出来了。
What I have now is the following: I can write expressions, do combinations of things to get out values, I can store them away, I can print them up.
我已经讲过如下内容:,如何写表达式,如果把东西混合然后得到结果值,我可以将其保存,也可以将其显示。
I showed you this in this picture here and those levels of control can be at the level of transcription.
我把这些都给你们显示在这张图上,调控可以在转录的水平下进行
So I wrote a little program called "chart" that, based on some data I happened to hardcode into the program, shows us their numbers for the past several years.
我写了一个叫做“图表“的小程序,基于我在程序中硬编码的一些数据,向我们显示在过去几年中我们课程的人数。
Now, on this screen is going to be instructions but I want to give the instructions to this half of the class.
现在,屏幕上将会显示出指导语,但我希望只有右边的同学看到这些指导语。
And so, I showed a slide up here which contrasts two different ways of thinking.
这里我有一张幻灯片显示的是,两种思维模式的对比。
And the Lord said to Moses, "How long will this people spurn Me, and how long will they have no faith in Me despite all the signs that I have performed in their midst?
上帝对摩西说“这些人要藐视我到几时“,他们还要不相信我到几时,当我在他们中间显示了一切神迹以后?
I suppose that label gives away where I want to come down on this.
我想这种分类显示了我的立场。
If I expressed a preference, I would be in trouble.
如果我显示任何偏好,恐怕会惹上麻烦。
It turns out-- I was talking about what happened in L.A.
结果显示,我一直都在谈论在洛杉矶发生了什么
It is right at 12:00.
那我的表显示的就是正好十二点。
I'm going to print it and let's see what it prints.
我要将其打出来,我想显示下数组的内容。
But if it is not, it's going to print out a message here saying, you screwed up, somewhat politely, and it's going to go back around. So it'll just cycle until I get something of the right type.
但是输入不是浮点数的话,我这里就会显示一个消息说,你搞砸了,该稍微有点礼貌吧?,然后我们继续执行循环,一直到得到正确类型的输入。
oh hi null This time I did nothing and so it just said oh, hi null.
这次我什么都没做,然后就显示。
OK, I can certainly print out strings, but I can actually add strings together, and just as you saw, I can multiply strings, you can kind of guess what this is going to do.
当然我可以显示字符串,但是其实我还可以令字符串相加,如你所见到的,我可以令字符串相乘,你们可以想想答案是什么。
And what I hope to do over the course of this lecture and the lecture on Thursday, is complete what's described on this outline slide here.
在这一节课和星期四那节课的讲授中,我所想做的,是完成幻灯片上显示的大纲内容
Square root of 16, and my plot basically shows it crosses at 4 and-- well, I think that's minus 4.
我的图清楚的显示这个函数,在4和-4两个点和x轴交合。
OK, in fact if we look at this, if I say, print of p, it prints it out in that form.
好,实际上如果,我们来看看这个,如果我输入,p的显示。
I'm going to go over here, and let me define a couple of these things.
仅仅是用来显示值的,好,让我们看看如果,我运行这个程序会有什么结果。
Let me generalize this. In this case, my incrementer was just adding 1 to an integer, it's a pretty straightforward thing to do.
当我完成后,我不会再显示任何信息了,好,好,那么你们已经看过两个简单的例子了,让我来讲讲概念,在这个例子中。
You notice what it did, it printed out that little, right up here I'd said enter a number and that's what it's printed out, so I can enter a number and it prints it out.
注意这个程序做了些什么,显示出了指定值,然后显示需要输入个数字,然后程序会显示这个数字,我输入一个数字然后程序显示了它。
And then we'll see if it is. So I think I put in one a two, right? Or one a two?
我认为我们把1a2放进了数组对不对?,那么显示结果应该是1,a,2了?
In this case it says, this is a syntax error, and it's actually highlighting where it came from so I can go back and fix it.
在这个例子中它显示这是个语法错误,并且会高亮显示它的位置,以便于我去修改。
This way I can torture you between tests by asking you questions.
这个方法可以停止显示,用这招我可以在测试的时候。
OK. What else do I have in here?
我的显示的结果?
And when I'm done with the whole thing, before I end the increment of the variable, you know, when I'm done, I'm just not returning anything out.
在循环外面初始化它,然后做一个终结测试,然后在循环内部有一个指令集,在这个例子中,就是对余数做检查,然后显示信息,当我完成了整个循环。
And notice, by the way, when I typed it how print showed up in a different color?
注意,顺便说一下,当我输入的时候,怎样才能显示不同的颜色呢?
I'm narrowing it down. It's getting a little silly but you know I'm going to really be persistent and just follow the rules here of binary search, rather than jumping to conclusions.
按照二分法的规则来做的,而不是直接得出某种结论,很明显这儿我的目的是什么?,显示这两个相同的东西。
I think they're purple or so in scratch, or yeah, purple, I think, generally; say hi, for two seconds.
我觉得在scratch中,它们是华而不实的,我觉得,通常,显示hi,只要两秒钟。
应用推荐