you are absolutely amazing yarr.. i know you have done lot of practice to teach and hope you will be one of the great programmer in coming days ....i respect you cause you still make video to share information even you have less viewers....thanks
I did like this !! n = int(input("Enter your numbers of even No. = ")) i = n count = 0 while (i>0): i = i // 10 count = count + 1 i = n sum = 0 while (i > 0): sum = sum + (i % 10)**count i = i // 10 if(sum==n): print("Armstrong Number") else: print("Not Armstrong Number")
just a suggestion to do this differently. first make a loop to count the number of digits, let the no.' of digits be n then write a seperate loop to take the sum of the digits^n.
@@youthoob3573 Sure mate, i have been loosing my shit since two years as you can clearly tell from my comment two years ago, I am calm now since you asked me to
#Sir we can use this also n=int(input("enter the number:")) i=n sum=0 x=len(str(n)) while(n>0): sum=sum+(n%10)**x n=n//10 if i==sum: print("yes the number is an armstrong") else: print("no the number is not an armstrong")
Sir I use the same program with same logics in pycharm, but i am unable to get the desired answers though indentation and other things are good in place.
sir , can we use this code >is it correct>>>>>>>>>>>>> a = int(input('ener a num')) i = a sum = 0 len = len(str(a)) while i>0: sum = sum + (i%10)** len i = i//10 if a==sum: print(' The num is armtrong') else : print('not armstrong') its working fine like yours.
n = int(input('Enter a number:=')) order = len(str(n)) org = n sum = 0 while n>0: sum = sum + (n%10)**order n=n//10 if org == sum: print("Number is Armstrong") else: print("Number is not Armstrong") This is the alternative to fird Armstrong number. if set the range between 1 to 500 or more use for loop.
Sir isse previous question me aap ne is online board (digitally) samjaya tha . Aur oski programming thodi alag thi aur isme thodha alag he . So dono question me difference kya he .
This is for any number of digits. The previous was only for three digits number.
3 роки тому
Sir I have an extra method to code this, pls let me know whether I am wrong or right? and mine one is using string function's feature. n = int(input("Enter a number: ")) sum = 0 i = n a = len(str(n)) while i > 0: digit = i % 10 sum += digit ** a i //= 10 if n == sum: print(n, "is an Armstrong number") else: print(n, "is not an Armstrong number")
n5 = input("Enter the number :") a = int(n5) b = a n5 = list(n5) i = len(n5) sum3 = 0 while a>0: sum3 = sum3 + (a % 10)**i a = a//10 if b == sum3: print("Number is Armstrong") else: print("Number is not Armstrong") the above code is also right or not at all conditions. please reply me.
Sir aise bhi kar sakte he na?? i=int(input("enter the number=")) a=n=i count=0 while(i>0): i=i//10 count=count+1 sum=0 while(a>0): sum=sum+(a%10)**count a=a//10 if sum==n: print("number is Armstrong") else: print("number is not Armstrong")
I HAVE A HUNDRED TIMES SIMPLER VERSION OF CODE : 🔥 (Using just 2 while loops and a pair of if-else statements) n = int(input('enter a number: ')) z = n k = n rev = 0 count = 0 while k>0: count += 1 k = k//10 while n>0: rev = rev + (n%10)**count n = n//10 if rev == z: print('The number is Armstrong') else: print('The number is not Armstrong')
Sir mai 12th class mai hu , sir mai abhi python study kr rha hu 117 video lecture wali playlist dekh rha hu,to kya sir mujhe class 12 python wali bhi playlist dekhni pdegi, in dono playlist mai same content ya different hai
i=int(input("enter the number")) o=i count=0 while (i>0): i=i//10 count+=1 i=o sum1=0 while (i>0): sum1=sum1+(i%10)**count i=i//10 if sum1==o: print("YES") else: print("NO")
Sir Aapke video achche se samaj aa rahe he....thanks.👍👍👍...Mera ek sawal he abi recently mere pas PC nhi he.. kya ye aap k samjhye hue program Android pr Chala sakta hu ? Kese? Or ye Jupiter note book par bhi aap k program run ho jayege?
you are absolutely amazing yarr.. i know you have done lot of practice to teach and hope you will be one of the great programmer in coming days ....i respect you cause you still make video to share information even you have less viewers....thanks
Thanks a ton🙂
@@codeitup lots of love from Nepal.......
@@nirojsubedi Thanks you so much!
He is nice teacher.
Pranam Gurudev, Aapki sabhi khwaishein poori ho. Aap mahan hai!!
🙂🙏
Ur teaching way is super awesome... U made this program easiest for me.... Thanks sir 🙏🏻
Glad to hear that!
hands down this is the best channel to learn python for Hindi-speaking beginners.
So nice of you, God bless you!
I did like this !!
n = int(input("Enter your numbers of even No. = "))
i = n
count = 0
while (i>0):
i = i // 10
count = count + 1
i = n
sum = 0
while (i > 0):
sum = sum + (i % 10)**count
i = i // 10
if(sum==n):
print("Armstrong Number")
else:
print("Not Armstrong Number")
easier ig
what's the use of count ? when your not printing
Perfect content perfect teacher perfect teaching style ... On the way to python
Thanks Praneet😊
Sir ap ka style hi amazing hy. thumbs up. by the way armstrong number find krnay k liye mujay last video wala method easy lga hy
Thanks Malik!
actually your explanation with dry run is so much adorable.
Glad you think so!
sir aapka padhane ka tareeka jabardast hai, maza aagya
🙂
sir your teching style is best also explanation
thank u sir u are the best teacher
Thanks & most welcome Hitesh!
I'm just starting loops and your video helps me a lot.
thanks
Glad to help you😊
Very nice video hai❤
Thank you so much !
Thank you sir❤
Most welcome!
Please do a total video on threads your explanation is high that influenced me so much
Thanks 😊 Sir 👍🙏
Most welcome!
just a suggestion to do this differently.
first make a loop to count the number of digits, let the no.' of digits be n
then write a seperate loop to take the sum of the digits^n.
its okay , everyone has their own method, calm down
@@youthoob3573
Sure mate, i have been loosing my shit since two years as you can clearly tell from my comment two years ago, I am calm now since you asked me to
#Sir we can use this also
n=int(input("enter the number:"))
i=n
sum=0
x=len(str(n))
while(n>0):
sum=sum+(n%10)**x
n=n//10
if i==sum:
print("yes the number is an armstrong")
else:
print("no the number is not an armstrong")
Good one!!
nice one
Sir I use the same program with same logics in pycharm, but i am unable to get the desired answers though indentation and other things are good in place.
Thanks you sir!!
You are great
Thanks & most welcome dear😊
very good sir, this video is very helpful for me, thanks,
Glad to help you Aneela!
very good explanation sir,thanku verymuch.
You're most welcome !
sir , can we use this code >is it correct>>>>>>>>>>>>>
a = int(input('ener a num'))
i = a
sum = 0
len = len(str(a))
while i>0:
sum = sum + (i%10)** len
i = i//10
if a==sum:
print(' The num is armtrong')
else :
print('not armstrong')
its working fine like yours.
If it is working fine then perfect Ansh. A single program may have different logic to solve.
n=int(input("Enter the number: "))
def arm(n):
i=n
count=0
while (i>0):
digit=i%10
count+ =digit**3
i//=10
if n==count:
print (n, "Armstrong")
else:
print(n, "Not armstrong")
arm(n)
Sir,video banate rahna👍🏻👍🏻👍🏻
mindblowing series
Thanks Ashish!
n = int(input('Enter a number:='))
order = len(str(n))
org = n
sum = 0
while n>0:
sum = sum + (n%10)**order
n=n//10
if org == sum:
print("Number is Armstrong")
else:
print("Number is not Armstrong")
This is the alternative to fird Armstrong number. if set the range between 1 to 500 or more use for loop.
Sir isse previous question me aap ne is online board (digitally) samjaya tha . Aur oski programming thodi alag thi aur isme thodha alag he .
So dono question me difference kya he .
This is for any number of digits. The previous was only for three digits number.
Sir I have an extra method to code this,
pls let me know whether I am wrong or right?
and mine one is using string function's feature.
n = int(input("Enter a number: "))
sum = 0
i = n
a = len(str(n))
while i > 0:
digit = i % 10
sum += digit ** a
i //= 10
if n == sum:
print(n, "is an Armstrong number")
else:
print(n, "is not an Armstrong number")
What's the difference between previous one??
n5 = input("Enter the number
:")
a = int(n5)
b = a
n5 = list(n5)
i = len(n5)
sum3 = 0
while a>0:
sum3 = sum3 + (a % 10)**i
a = a//10
if b == sum3:
print("Number is Armstrong")
else:
print("Number is not Armstrong")
the above code is also right or not at all conditions.
please reply me.
Sir aise bhi kar sakte he na??
i=int(input("enter the number="))
a=n=i
count=0
while(i>0):
i=i//10
count=count+1
sum=0
while(a>0):
sum=sum+(a%10)**count
a=a//10
if sum==n:
print("number is Armstrong")
else:
print("number is not Armstrong")
I HAVE A HUNDRED TIMES SIMPLER VERSION OF CODE : 🔥
(Using just 2 while loops and a pair of if-else statements)
n = int(input('enter a number: '))
z = n
k = n
rev = 0
count = 0
while k>0:
count += 1
k = k//10
while n>0:
rev = rev + (n%10)**count
n = n//10
if rev == z:
print('The number is Armstrong')
else:
print('The number is not Armstrong')
i'm not getting this program , it is lengthier so i would prefer the previous way. although thanks for the explanation sir..
Sir iske phle wala mathod bhi sahi h na ?
Wo sirf 3 digit numbers ke lie tha, ye any number of digit ke lie hai.
@@codeitup okk sir thanks
Sir m programming 1st tym kr rhi hu..in formula ko learn krna padta h kya..?
Yes Lovely, kuch formula aapko yaad karne hoge.
n=int(input("ENTER NUMBER:"))
i=n
count=0
while(i>0):
i=i//10
count=count+1
i=n
sum=0
while(i>0):
sum=sum+(i%10)**count
i=i//10
if(sum==n):
print("ARMSTRONG")
else:
print("NOT ARMSTRONG")
sir aisa kar sakte hai?
Yes, kar sakte hai !
Thank you sir
Most welcome!
NICE SIR
Thanks dear😊
Sir can we use len () function instead of looop
Yes you can ! But in exams you can not use pre defined functions.
Sir mai 12th class mai hu , sir mai abhi python study kr rha hu 117 video lecture wali playlist dekh rha hu,to kya sir mujhe class 12 python wali bhi playlist dekhni pdegi, in dono playlist mai same content ya different hai
Thanks sir
Welcome Rounak!
i=int(input("enter the number"))
o=i
count=0
while (i>0):
i=i//10
count+=1
i=o
sum1=0
while (i>0):
sum1=sum1+(i%10)**count
i=i//10
if sum1==o:
print("YES")
else:
print("NO")
Excellent teaching but please teach in English also.....
Sir amstrong wali ek or vdo h jisme ek particular cube k condition p h kya wo bhi shi h kya
Wo sirf 3 digit number ke lie hai...
Sir ye BCA valo ke according h na
sir isse phle bhi ek video hai armstrong ki....usme count variable ke bina karvaya hai apne.
which one is more correct?🙂😃
Last video is for 3 digit only. This video is for any number of digit. SO, this program is better.
@@codeitup thanx sir❤️❤️..
Bhout easy h
i=int(input('enter value'))
org=i
count=0
while i>0:
i=i//10
count=count+1
org=i
sum=0
while i>0:
digit=i%10
x=1
prod=1
while x>=count:
prod=prod*digit
x=x+1
sum=sum+prod
i=i//10
if org==sum:
print('Arm')
else:
print('Not Arm')
Century comment🎉
Sir previous armstrong ki video mai toh kuch aur coding thi?
Previous coding sirf 3 digit number ko hi armstrong ke lie check kar sakta tha. Ye any number of digit ke lie hai.
@@codeitup ohkh sir.thnx
Sir can u please make playlist on oops also
Sure but it will take some time !
sir regular expression pe series bnado please
Sure !
Sir exercise bhi diya kro..
💥💥
🙂
Sir please make a whats app group for this course
bhai sahab agar ese coding sikhoge toh jo ata hoga vo bhi bhul jaynge
ye itna complicated nahi hai jitna apne bana diya
Sir video banate rahie
Sure Ramesh !
Ye muskil lag Raha he sir ji...koi or method ho to bataye
Armstrong ka program hota hi thora complex hai. Bas video, 2-3 baar dekhie with full concentration and I am sure aapko samajh aa jaega..
Sir Aapke video achche se samaj aa rahe he....thanks.👍👍👍...Mera ek sawal he abi recently mere pas PC nhi he.. kya ye aap k samjhye hue program Android pr Chala sakta hu ? Kese? Or ye Jupiter note book par bhi aap k program run ho jayege?
@@atulsharma2490 You can use QPython app to run the python programs in Android. Yes, all these programs may run on Jupyter.
@@atulsharma2490 You may use QPython app to run all the python programs in mobile.
@@atulsharma2490 You can run all python programs in an App called QPython.
Complicated video
thank you sir