Sum of the sequence 2 , 22 , 222 , ... ... ... | Python3 code to find sum of series 2 , 22 , 222 , . . ; function which return the sum of series ; driver code
import math NEW_LINE def sumOfSeries ( n ) : NEW_LINE INDENT return 0.0246 * ( math . pow ( 10 , n ) - 1 - ( 9 * n ) ) NEW_LINE DEDENT n = 3 NEW_LINE print ( sumOfSeries ( n ) ) NEW_LINE