0
How to write a code to add a sequence D+DD+DDD+DDDD form
in the above sequence value of D is 5 and the sum value is 6710
3 Answers
+ 2
print(sum([int('5'*i) for i in range(1,5)]))
+ 1
5+55+555+5555=6170
0
That's 6170
in the above sequence value of D is 5 and the sum value is 6710