diff --git a/Ch 06 Loops/EG6-02 Loop with counter.py b/Ch 06 Loops/EG6-02 Loop with counter.py index a8e77bb..7854822 100644 --- a/Ch 06 Loops/EG6-02 Loop with counter.py +++ b/Ch 06 Loops/EG6-02 Loop with counter.py @@ -4,3 +4,11 @@ print('Inside loop') count=count+1 print('Outside loop') + +# An example of count in a loop can be - +n=int(input("enter number:")) +count=0 +while n>0: +count=count+1 +n=n//10 +print("The Count of digits ",count)