Count Digits of N | Python Program

preview_player
Показать описание
After watching this video, you will be able to write a Python program to count the number of digits for a given integer N

Problem Statement:
Given a integer N, you need to calculate the total number of digits in N

Example 1:
Input
Enter n: 456 (user input)

Output
3

Example 2:
Input
Enter n: 0 (user input)

Output
1

Example 3:
Input
Enter n: 2114156 (user input)

Output
7
Рекомендации по теме
Комментарии
Автор

Thanks a lot! I was completely clueless when I saw the solution somewhere else ..but now I understood ..

studyarora
Автор

Thank you so much sir! You made the logic clear

yourmothersoyen
Автор

Great bro very nicely you explained to us ❤❤love

SamiKhan-fnkj
Автор

Splendid! really understandable content

tonyhiga
Автор

Thanks a lot, bro. Really was of great help.

hs
Автор

Sir why did you take n//10...
Can we take another number in place of 10

iitz_.srinivas