Sum of the series 0.6 , 0.06 , 0.006 , 0.0006 , ... to n terms | Python3 program to find sum of 0.6 , 0.06 , 0.006 , 0.0006 , ... to n terms ; function which return the sum of series ; Driver code
import math NEW_LINE def sumOfSeries ( n ) : NEW_LINE INDENT return ( ( 0.666 ) * ( 1 - 1 / pow ( 10 , n ) ) ) ; NEW_LINE DEDENT n = 2 ; NEW_LINE print ( sumOfSeries ( n ) ) ; NEW_LINE