Write a Python program that takes a number and tells how many digits are in that number. [Consider the input number to be an INTEGER.] You are not allowed to use len( function Example: If the user...



Must show it in Python:



Please show step by step with comments.



Please show it in simplest form.


Write a Python program that takes a number and tells how many digits are in that number.<br>[Consider the input number to be an INTEGER.]<br>You are not allowed to use len( function<br>Example: If the user gives 9876, you should print 4.<br>Hint: Keep floor dividing by ten and count how many times this could be divided.<br>9876 floor divide by 10, is 987, count that got 1 digit (total 1)<br>987 floor divide by 10, is 98, count that got 1 digit (total 2)<br>98 floor divide by 10, is 9, count that got 1 digit (total 3)<br>9 floor divide by 10, is 0, count that got 1 digit (total 4)<br>Done! (When the number becomes 0 your loop should end.)<br>

Extracted text: Write a Python program that takes a number and tells how many digits are in that number. [Consider the input number to be an INTEGER.] You are not allowed to use len( function Example: If the user gives 9876, you should print 4. Hint: Keep floor dividing by ten and count how many times this could be divided. 9876 floor divide by 10, is 987, count that got 1 digit (total 1) 987 floor divide by 10, is 98, count that got 1 digit (total 2) 98 floor divide by 10, is 9, count that got 1 digit (total 3) 9 floor divide by 10, is 0, count that got 1 digit (total 4) Done! (When the number becomes 0 your loop should end.)

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here