write an algorithm to classify the numbers into single digit double digit or large number also check you algorithm with the input number i) 8 ii) 56 iii)567
Answers
Answered by
0
def count_digits(num):
if len(number) == 1:
return "single"
if len(number) == 2:
return "double"
return "large"
if __name__ == "__main__":
number = input("Enter amount: ")
print(count_digits(number))
Similar questions