Question: using python write a program that reads an integer and prints how many digits the number has, by c hecking whether the number is <10,
using python write a program that reads an integer and prints how many digits the number has, by checking whether the number is <10, <100, and so on. (Assume that all integers are less than ten billion.) If the number is negative, first multiply it by -1. DO NOT use the len, sort, count functions or while loop Use the if/elif block.
1) Screenshot code with comments please
Test Cases:
20 (should print "2 digits")
-89654 (should print 5 digits)
9000000000 (should print 10 digits)
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
