So let me just to try something a little more interesting, and then we'll get to writing some simple programs.
让我们来试试更加有趣的,一些事情吧,然后,我们再去写一些简单的小程序。
So I am going to on the fly write a very simple little main program that just illustrates some of the syntax that we can then visualize more interesting.
我很快的写了一个很简单地小程序,来说明一些语法,我们使它变得更有趣些。
So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.
好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。
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.
我写了一个叫做“图表“的小程序,基于我在程序中硬编码的一些数据,向我们显示在过去几年中我们课程的人数。
So writing a program at least in this language is a two-step process.
用这种语言写一个至少需要,两步完成的小程序。
应用推荐