Sum of 1 series
This Program name is Sum of 1 series. Write a Python program to Sum of 1 series, it has two test cases
The below link contains Sum of 1 series question, explanation and test cases
https://drive.google.com/file/d/1M5N-yqq2LYyV05d-ThnD_SQ59nm9b1Vb/view?usp=sharing
We need exact output when the code was run
N = int(input( " Enter the input: "))
sum = 0
for i in range(N):
z = (10**(i+1) - 1)/ 9
sum += z
print(sum)
Comments
Leave a comment