But the unemployment rate has also topped double digits for the first time in 26 years.
VOA: standard.2009.12.15
So what would I want to do? I'd like to somehow walk down each of the digits one at a time and add them up. Ah, that's a looping mechanism, right? I need to have some way of walking through them.
去取这个数的,每个数字然后把他们加起来,啊,这是个循环机制对不对?,我得找到一个遍历它们的方法,一种简单的方法可能。
And there's probably more digits after the decimal place, but because of my formatting string, I only see a couple of them.
这里可能有更多的小数位,但因为我对结果设定了格式,我们只看到两位。
But at what cost? A year after the president took office,unemployment has reached double digits and the nation's deficit hit a record $1.4 trillion.
VOA: standard.2010.01.15
Suppose I take a number. I'd like to add up all the digits inside of the number.
我可以用到刚刚提到的工具,来实现这个功能。
A rebound is expected in 2010, but the US government predicts a shift in the makeup of foreign visitors, with arrivals from Asia and South America growing by double digits.
VOA: standard.2010.05.04
And this time it did not subside, it never fall below double digits for the entire remainder of the decade of the 30s.
这次失业率没有下降,再也没有下降到两位数以下,20世纪30年代余下的时间也没有。
With U.S.unemployment near double digits, Cardillo cautions the Obama administration to tone down its rhetoric against Wall Street - something political analysts say is unlikely with U.S.mid-term elections only months away.
VOA: standard.2010.07.20
Two significant digits is good enough.
个有效数应该绰绰有余了。
"He is at 50 or below in most surveys, and that is mainly because of the economy, which continues to be stubbornly weak, the unemployment rate is very high and still in double-digits, and as a consequence Obama does not have much margin for error,".
VOA: standard.2010.01.06
What's the biggest number you can represent with three decimal digits? Pardon?
你们想用这3个十进制数表示什么?,请再说一遍?
You may notice that it's always printing out the same number of digits.
显示同样长度的数字,这是怎么回事儿?
And yet the unemployment never came down below double digits for the entire decade.
但是失业率,从来没降到两位数以下,整个30年代都这样。
That means starting at the first one, I'm going to do something to it. And what am I'm going to do? I'm going to take that character, convert it back into an integer, and add it into some digits. And I've done a little short hand here, which is I should have said some digits is equal to some digits plus this.
这意味着从第一个字符开始,我要对他们进行一些操作,我要去做什么呢?我要取得这个字符,然后把它转换为整数,然后加到某些数上面去,我在这里用了一些缩写,我本来应该写一个数字等于这个数字。
The so called binary system, 1 these zeros and ones that you'd probably have some vague sense underlie all computers today actually reduced to the exact same grade school kind of math and system except with computers, 1 because it's a lot easier to use just two digits, zero and one.
所谓的二进制就是,你觉得模糊的0与,在电脑上计算,事实上可以简化为跟小学数学一样,只是在电脑上计算而已,因为它更容易,仅仅使用两个数字,0与。
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.
加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果。
So it turns out there's a solution to this: If you need more precision, more digits after the decimal point than a float allows, what do you go for instead?
所以这里有一个解决方案:,如果你需要比float类型允许的更高精度,小数点后更多位数,那你该用什么取代它?
And I said I'm giving you three decimal digits.
我说给你们3个10进制数。
And a bit, B-I-T, just a shorthand for binary digit, 2 so a digit of zero over a one, bi means two, you only have two digits.
比特,B-I-T,是binary,digit的简写,从0到1的数字,而bi表示,所以你就只有两个数字。
I then create a third variable called "z," add those two digits together, store the sum.
然后我声明了一个叫做“z“的变量“,把这两个数字加起来,把他们的总数存起来。
So eight months after the stock market crashed, ve not hit the double digits in unemployment.
也就是说股票市场崩溃的八个月中,失业率都没有达到两位数,we’
- %d means -- >> >> David: Yep, so one or more digits.
d意思是-,>>,【无法辨认的声音】,>>,大卫:是的,1或更多的数字。
Percent D is for a digit, like a number or-- one or more digits.
d代表以数字的形式输出,比如一个数字或者--1或更大的数。
And this is a little different from what happened ten or so years ago, but the so-called Y2K problem was essentially the result of programmers not really having the foresight to realize, "Maybe we shouldn't use so few bits or so few digits to represent a year because eventually this will be a problem."
这个跟10年前发生的事情有点不一样,那个所谓的“Y2K“问题,本质上的结果是,程序员没有真实地预见和认识到,“可能我们没必要用到这些位数或数字,来表示一年,但是最终这个将会,是个问题“
If we need a 7, this is the ones column, the twos, fours, eights, so here are our columns and this was our decimal system a moment ago, and I wanna express the number 7 and the only digits 0 I now have access to are zero and one, whereas, in decimal, dec meaning 10.
如果你需要7,这是一位,二位,四位,八位,这是位数,刚才说的十进制的位数,我想表达7而且,只能采用数字1与,在十进制中,dec意思是十。
b OK. In this example I'd use b. All right, as b get-- b is the thing that's changing as I go along here, but it could be things like, how many elements are there in a list if the input is a list, could be how many digits are there in a string if the input's a string, it could be the size of the integer as we go along. All right.?
好,在这个例子里我会用,因为b是一直在变的东西,但是也可能是如下情况:,如果输入是数组的话,变化的就是数组的元素数,如果输入是字符串的话,变化的就是字符串的长度,如果是integer的话,可能就是这个数的大小,对不对?
应用推荐