Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
sale_id = int(input("Positive ID: "))
digits = 0
remaining = sale_id
while remaining > 0:
remaining //= 10
digits += 1
print("Digits:", digits)