OK. Now, having done that, again I want to stress this idea and I'm going to write it out one more time, that there's a particular format here.
好,讲完了这些,我又想要强调一下这个思想,并且再一次把它写出来了,就是有一个特定的格式。
Another thing that happened-- ... they started developing-- it's not invented in the nineteenth century, but they started doing standardized forms.
当时还发生了一件事-,人们开始发展-,这不是19世纪发明的,不过他们开始制作标准化格式。
And there's probably more digits after the decimal place, but because of my formatting string, I only see a couple of them.
这里可能有更多的小数位,但因为我对结果设定了格式,我们只看到两位。
It's simply, notice the form of it here is, it's going to take two arguments, self self is the original instance.
这很简单,注意这里的格式,它有两个参数,你说对了,是原始的实例,and,you’re,right,也就是说。
Because I was taught good style, I'm giving that variable a name that conjures up the idea of its role, which is thankful or not.
因为我们学习了好的格式风格,我将给那个变量起一个,能使我们联想到它的角色作用,它是满意的或不满意的。
They came formatted or blank so not such a big deal.
它们被格式化了或者是空白的这并不重要。
And so this is why in problem set 5 last year when I took photographs on campus with a compact flash card, just standard consumer media and I accidentally formatted that compact flash card, I only lost the first few kilobytes, the first few thousand bits on that compact flash card.
这也是去年的套题5中,我们在校园里面用配有,简易闪存卡的标准摄像机拍照片,我不小心格式化了这个简易闪存卡,其实我只是丢失的最开头的几千个字节的数据。
The format is the same. I'm going to ask for some input, and then I am going to use that procedure to check, is this the right type of value. And I'm trying to use that to do the coercion if you like. Same thing if it works, I'm going to skip that, if it not, it's going to throw the exception.
格式是一样的,我需要一些输入,然后我要用一个过程来检查,是否是正确的值,然后你就可以做强制转换了,如果能运行,那是一样的,我打算跳过这段,如果不正确,那就会抛出一个异常。
But if it does take input, you have to provide it in the form of arguments or parameters, like print F takes, generally, inside of those parentheses.
但是如果它获得了输入,你需要为它提供相应格式的,参数或参量,像printf的输入,一般地,在这些圆括号里。
You can go to any one of these times more comfortable, less comfortable, somewhere in between, and the focus of these sections will be on the material cover this week as well as potentially the start of next week and with a focus on problem set 1, which is the second problem set, 0 index which will go out via PDF this weekend.
只要你乐意,上哪堂课都可以,这些课程不仅覆盖了本周的学习内容,也可能囊括了,下周要学习的知识,请大家把注意力集中到我们的第二本习题集--习题集1上,这周末会以PDF格式发布出来。
应用推荐