You doing cell_count * 10
is the correct calculation, but since you are not assigning it back to the variable cell_count
, it remains the same as earlier and that's why your answer is showing incorrect.
To understand, if we say a = 2 and then a+1 is 3, but a is still 2, to make a = 3, you will have to do a a = a+1.
So there are two approaches:
The simplest is
cell_count = cell_count * 10
Another more efficient way is cell_count *= 10
, *=
is a special character in python which multiplies and assigns to itself in one single operation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…