python_exercises/thinkcspy/Chapter-9-Exercises/Problem5.py

15 lines
243 B
Python
Raw Normal View History

2023-10-07 18:50:21 -06:00
# Runestone.Academy thinkcspy course
# Chapter 9
# Problem
def numDigits(n):
# your code here
toText = str(n)
count = 0
for i in range (len(toText)):
count += 1
return count
print(numDigits(13))