So generally, if you don't get an error message in a command line environment like this, that's good.
一般来说,如果你在命令行界面,没有收到错误信息,那就是好消息。
But if I say turn this into a float, ah it throws a value error exception.
它就会抛出一个值错误异常了,它会告诉我输入了一种错误的值。
If it's just an addition error, the recitation instructor has authority to make that adjustment.
如果那只是附加错误,导师有权利,更正成绩。
If you go onto some of the other foods in here you see that the error became even greater in some of these cases.
如果你们看表上的其他一些食物,一些例子的估算误差会更大
It seems to me that if you type this you'll get a spell check error.
我拼写不是很好,要是有拼写检查就好了
So we've embedded some error checking, if you will, into our implementations.
所以我们植入了一些错误校验,如果你愿意,在我们的执行代码里。
It can be 5 dollars minus your error in pennies, if you won.
如果你赢了就是五美元减去你的误差
If I gave this lecture ten years ago, I would say that the fundamental attribution error i s a human universal, something that we're born with, a fundamental aspect of human nature.
如果我在十年前讲这节课,我会说基本归因错误,是人的普遍特性,是我们天生就有的,是人性的一个基本特征。
And what do I do if I get a key error?
如果我得到了关键字错误该怎么办呢?
If not I'll get a key error.
如果不在,我会得到一个关键字错误。
Notice if I'm going to have two different sub problems I need to have two base cases here to catch this. And if I only had one it would error out. And as a consequence, I can go off and ask about rabbits. Let's see.
我需要定义两个基础事件来处理它,如果我只有一个基础事件的话就会产生错误,这样我就能够知道到底有多少只兔子了,让我们来看看,在第12个月末,没那么简单,在第二年末兔子就很多了。
So this is the percent error and what you see here is that if the number is below the zero line it means people underestimated the calories, and the bars that go above means people overestimated the calories.
这是百分比误差,你们看,如果数字低于零,这表示人们低估了卡路里,高于零表示人们高估了卡路里
But the take away for now is that if you don't clue -lcs50, -- you get some mention -- some error message -- about "undefined symbol," and that should be your clue that, "Oh it's undefined in that I haven't told the compiler that I want to link in these zeros and ones."
但现在如果你删除“-lcs50“,你们会得到一些提示--一些错误信息-,像“未定义的符号“,这可以为你提过线索,“这个没有被定义,我没有告诉编译器,把想把这个与“1“和“0“建立连接,“
应用推荐