Four times the number of pigs plus two times the number of chickens, assuming they're not next to a nuclear reactor, is 56.
其它还有什么呢?,4倍的猪的数量加上两倍的鸡的数量,考虑到它们不是住在核反应堆旁的。
You could say, I could have zero chickens and 20 pigs, does that work? I've got one chicken and nineteen pigs, does that work?
为什么简单列举出所有可能的情况,再一个来检验?你可能会说,我可以有0只鸡和20只猪,这能行吗?
On the back of it, an iron bed and a chair and table were tied, and on top of them a crate of Barred Rock chickens."
车尾绑著一张铁床、椅子和桌子,上面还有一箱芦花鸡,“
And the question is, so how many pigs does he have, and how many chickens does he have? Wow. What a deep problem, right? But you're going to see why we're going to use this in a second. So you know how to solve this, this is a fifth-grade problem, right?
为了避免歧义,这些猪和鸡都是健全的,现在问题是它到底有多少只猪和鸡呢?,多深刻的一个问题啊,对吗?,但是你将要看到的是,我们为什么要举这个例子,你知道如何解答这个问题?
chickens OK, and then once I've got that, well, notice: I can then check to see, did I return that special symbol none?
第二部分是:,现在一旦我获得了这两个值,注意,我将再检查一下?
And for sake of argument, there are no amputees among the chickens and the pigs.
它走到农地里然后它看到了,20个头和56只脚。
System of linear equations. What are the equations here? Well, I could say, you know, the number of pigs plus the number of 20 chickens equals 20, right? Because we've got 20 heads. And then what else do I have?
如何解决这个问题呢?,用线性方程式的办法来解决,等式是什么呢?你应该知道,猪的数量加鸡的数量等于,对吧?因为我们有20个头?
I've got two chickens and eighteen pigs, you get the idea.
我有1只鸡和19只猪,这能行吗?,我有2只鸡和18只猪。
pigs chickens will be the second part.
第一部分是。
is run a FOR loop here. I'm going to let the number of chickens be in this range.
我知道怎么做对吧?写一个小循环,我所需要做的就是运行一个for循环。
应用推荐