实现相同结果的另一种方法是测试tuple中的当前项是否是偶数(使用if not num % 2:),如果为真,那么将当前项添加到运行总和中。
An alternative method to accomplish the same result would test whether the current item in the tuple is even (using if not num % 2:) and, if true, would add the current item to the running total.
它只是列出它运行的时间间隔内所获得的节拍数量总和;它不会列出这些节拍发生在时间间隔的哪一时刻。
It just lists the total amount of ticks received over the interval that it ran; it does not list at what points during the interval these ticks occurred.
运行所有这些命令(Ant目标classifier - example将在一次调用中捕获所有它们),这将生成如清单6所示的汇总和混合矩阵。
Running all of these (the Ant target classifier-example captures all of them in one call), yielding the summary and confusion matrix shown in Listing 6.
But that little short hand there is doing exactly the same thing. It is adding that value into some digits and putting it back or signing it back into some digits. And I'll walk through that loop and when I'm done I can print out the total thing does. And if I do that, I get out what I would expect.
加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果。
应用推荐