Number of digits in a number using python #shorts #python #education #coding #software #Tech

preview_player
Показать описание
ALGORITHM : First we take total digits as 1 and the value that divide the number as 10 Then we calculate the integer valve of number/divisor
In a while loop if this value is not equal to zero then we add +1 to the digits value and multiply 10 to divisor
Here is the code for your reference:
number=12367158964
digits=1
div=10
value=int(number/div)

while (value!=0):
digits=digits+1
div=div*10
value=int(number/div)
print(digits)
#shorts #python #education #coding #software #Tech #timepass
:)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Рекомендации по теме
Комментарии
Автор

Where do you live??
And make a QnA video also
I have so much doubts about your identity 😁

aryansharma
Автор

I know a web developer who will definitely help you in making your website I will give you the his insta id if you want and he is my friend also.

aryansharma
welcome to shbcf.ru