given an integer N, write a program that prints the count of the total numbers of digits between 1 and N.
def digits(N): st = "" for i in range(1, N + 1): st += str(i) print(len(st)) N = 111 digits(N)
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment