Python Program to Check Armstrong Number
Вставка
- Опубліковано 18 жов 2024
- Armstrong number in Python: In this video, we will write a Python program to find Armstrong number
Python Practice Playlist: • Python Practice Progra...
►Checkout my English channel here: / programmingwithharry
►Click here to subscribe - / @codewithharry
Best Hindi Videos For Learning Programming:
►Learn Python In One Video - • Python Tutorial In Hin...
►Python Complete Course In Hindi - • Python Tutorials For A...
►C Language Complete Course In Hindi -
• C Language Tutorials I...
►JavaScript Complete Course In Hindi -
• JavaScript Tutorials I...
►Learn JavaScript in One Video - • JavaScript Tutorial
►Learn PHP In One Video - • Learn Php In One Video...
►Django Complete Course In Hindi -
• Python Django Tutorial...
►Machine Learning Using Python - • Machine Learning Tutor...
►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
►Advanced Python Tutorials - • Intermediate/Advanced ...
►Object Oriented Programming In Python - • Object Oriented Progra...
►Python Data Science and Big Data Tutorials - • Python Data Science an...
Follow Me On Social Media
►Website (created using Flask) - www.codewithhar...
►Facebook - / codewithharry
►Instagram - / codewithharry
►Personal Facebook A/c - / geekyharis
Twitter - / haris_is_here
Armstrong to theek hai lekin ye Binod kon hai?
Binod is Binod 🤣😎
Are apko nhi pta 🤣🤣 ya likes ke liy likha hai
Binod ka toh pta nhi pr Nitish toh apun ha
Sir Binod CORANA KA BADA BHAI hai 😅
mere pados m rehta h
I m 14yrs old and we r not taught programming in school, I started learning programming in 6th, and am an intermediate python coder, all just bcoz of you, hope you read and if yes, plz reply or give a ❤️👍😊☺️
Please
@@technoguide1462 ?
@@siddheshphadke3719 same here
@@siddheshphadke3719 please give me feedback please
@@DivyanshuLohani what happened
Harry bhai, you are a wonderful teacher and programmer
If you like please support
I took a different approach!
n = input('Enter the number: ')
length = len(n)
value = 0
for i in n:
a = int(i)**length
value = value + a
print(value)
if value == int(n):
print('The number is an Armstrong number!')
else:
print('The number is not an Armstrong number.')
@Malik Abdullah Nasir it's is nice coincidence
so why are u learning to code
Great way to make us acually realise HOW TO CODE !!!!!!!!!!!!
def haarms(n):
n=str(n)
ghat=len(n)
ds=0
for d in n:
ds+=(int(d)**ghat)
ds=str(ds)
return (ds==n)
print(haarms(153))
Aisa lgta h aap pura mere college k sath chl rhe ho same...topic there same topic here even in same lang
So nice of u
Plot Twist: Harry and you are in same college, but he didn't revel his identity yet 😂😂😂
@@yashbansal1414 😂😂😂kash
Apki waja se mai apne sapne pure kr pa rahahun Mai apni kud ki websites banali h ab mai bahut jald payse Arun kr pauga
Lekin yh bat Jan kr bahut khushi ho ki mai ek electrical engineering karne wala student apki waja se ek Web developer bn paya.
Harry bhai theak haa code
number = input("Number Enter:
")
lennumber = len(number)
sum=0
for i in number:
square= int(i)**lennumber
sum+=square
if int(number) == sum:
print("Number is Armstrong")
else:
print("Number is not Armstrong")
Thank you very much!
Harry bhai this would also work:
from math import pow
z = (input("Enter a number: "))
p = list(z)
c = 0
for i in range(0, len(p)):
t = pow(int(p[i]), len(p))
c = c+t
if int(z) == c:
print(f'{z} is an armstrong number')
else:
print("Not an armstrong number")
🔥🔥🔥
another possible solution is this
num=input('please enter the number in question')
n=len(num)
sum=0
for digit in num:
sum+=int(digit)**int(n)
if int(sum)==int(num):
print('it is an armstrong number')
else:
print('it is not an armstrong number')
You are great genius coder.
excellent bhai this question was asked to me in one of the interviews i faced recently !
Harry bhai apke channel per java ke tutorial nahi hai. So please upload full java course begineer to advanced. Apse achha koi nahi samjata hai pure youtube per.
Number ki digits ke liye calculation ki kya need hai? Number ko string me convert karke uski index ke liye bhi loop chla sakte hai.
Bro video dekhne se pahele..main try Kiya...🤗🙈 aur Success bhi Mila..😎🙈✌. You are ossm bro..✌
Harry bhai ur best programming teacher
n = 1634
Order = len(str(num))
Sum = 0
Temp = n
While
thanks brother its help me a lot
def isArmstrong(number):
numList = list(str(number))
sum = 0
for numbers in range(len(numList)):
sum = sum + int(numList[numbers]) ** len(numList)
if sum == int(number):
print(f"Yes {number} is a Armstrong number")
9:09 We've changed the value of n in loop.
Perfect explanation sir... I wish i had a teacher like you🙄🙄🙄
Sirji apke tutorial BHOT badiya hote hai....kya aapp Java programming language ke tutorial leke aa skteho
Harry bhia aapka internet really superfast hai.. Bilkul aapki tarah 🔥🔥🔥🔥
Sir you have made learn linux in one video tutorial and it helped me a lot. Can you make a full tutorial on linux. Please..🙏🏻🙏🏻🙏🏻
And if it is already there then can anyone provide me the link.
there should be temp = n, as n keeps changing and becomes 0 at last. SO we have to store the input value to a temp variable
Yes
Bhai mast video banai hai.. aise hi aur banao yrr
good explanation harry
harry bhai.. aap ka web development course bohot hi accha tha. please start a course on angular or reactJS.
Bohot achhe harry bhai.Please aise aur practice programs banaye
Make video on anagram of strings
Harry bhai Main final year student abhi start hua hai mujhse data Structure kuch khass nhi aata main ye jaanna chahta hu ki aapki data structure ki series kitni time pr khatam hogi ek guzaris smjho yaa apne bhai ki request try to upload videos regarding Data Structures and Algorithm only not other stuff. This will help me out. Aapke DS and algo series mujhe pasand aayi aur main use continue krna chahta hu.
If u read my comment kindly reply.......
Write now I am taking ur Complete C tutorial that is awesome itna aache se toh hamare professor ne bhi nhi smjhaya.
So, think About it please......................
Please make tutorial for java...mostly needed.
Thank you soooooo much!!
a=int(input())
b=[]
for i in str(a):
c=int(i)
b.append(c**len(str(a)))
if sum(b)==a:
print(f"{a} is an Armstrong number")
else:
print("No it is not")
number shd be assinged in another temporray variable the equate in if block
Harry bhai.... debugging pe bhi video bana do plzzz
Harry Bhai ....love u....i was very obssessed with code when i first learn from another UA-cam channel....but when i started watching your vdo.....swear to god.....siddha dimaag me gushta hai......maja aa gaia....Love u bro....Maja aa gaia
Perfect teaching skills 👌
Sir you are great but please tell me about how to make games and app by python
Sir,
Please please please make a video on Pyside2 Qt5 please please make video
Yeh raha armstrong number ko check karne ka code.
num = input("Enter the number:
")
lst = []
for c in num:
lst.append(int(c)**int(len(num)))
if sum(lst) == int(num):
print("This number is a armstrong number")
else:
print("This number is not a armstrong number")
thank you
please post more python programs like this
Sir please make a video on which desktop is best for for programming
Very well explained!
c# ke upar bhi ak complete tutarial banado . bohathi acccha hoga
harry bhaiya thnx mai 13ka hu aur coding sikh rh hu thnx
Bro make this series in python too please🙏🙏🙏🙏🙏🙏
Yes variable kisi or value me save karna padega
Can this be done with for loop???
n ki value while loop ke endgame ke baad 0 hogi kyuki floor division of last 8//10=0 dega
n ki value intact toh nhi thi badal gayi aur agar ap uss n ki value se program krte ho toh not an Armstrong aayega
Harry bhai Apptitude and Reasoning Job pane ke liye jaruri hai kya uspe video banao or jaruri hai to kese kar sakte hai or kaha se vo batao pls . . .
Make video on css animations
Awesome program harry bhai.......
And last main ji tune bajate ho uska naam kya hai??
Harry bhai can you please make tutorials on Java pls
Thank you harry for this great vedio... Lots of love your way... ❣️❣️ keep making us more perfect in python.
Shukriya bhai ❤
lambda n: n == reduce(lambda x, y: x + y, [int(str(n)[i]) ** len(str(n)) for i in range (len(str(n)))])
perfect 👌👌
Thanks so much sir
Please also make video in machine learning project and also data structure and algorithms in python.....
Please make a series on data structures and algorithms in python please. 🔥💯
Yes please Harry bhai
num, sum = input("Enter a number: "), 0
for i in num:sum += (int(i) ** len(num))
if (sum == int(num)):print(f"{num} is an Armstrong number.")
else:print(f"{num} is not an Armstrong number")
sir this is the shortest code i can write for this problem please verify
Bhai ek question hai important ,do you know how can we read the data which is in ram ?
I am big fan of you..
Name: Rajveer singh
Space tech sikhao please jo whitehat jr me sikhate hai faaltu me 1 lakh rupees charge karte hai jabki aap ye sab chize free me dete hai you are great human being par please ek baar whitehat jr ka course dekho or uspe ek playlist banao
Sir how are you able to write? I mean what stylus and pad are you using?
Thank you Harry bhai👌🏻
6:52 Bhaiya agar digit ko append kare toh nhi chalega??
Sir make videos on star patterns in C programming language
Bhai ek dil dedo agar aap future mein ek AI game banaoge just like chess.
are you using any external device for writing?
nice sir
def armstrongnumber(n):
arm = 0
for i in range(0,len(str)):
arm = arm + int(str[i])**len(str)
print(arm)
if arm == int(str) :
print("The Entered number is Armstrong number")
else:
print(f"The Entered number is not an Armstrong number as {arm} not equal to {int(str)}")
if __name__ == '__main__':
str = input("Enter a number:")
armstrongnumber(str)
# print(arm)
Sir apne ek video mein bataya hai ki C IMO Hai But meine programming apki PYTHON FOR BEGINNERS se ....Ab mujhe kya karna chahiye
PLZ PLZ AP REPLY DIJIYE🙏🏻🙏🏻🙏🏻
Bhai ek problem hai kyoki mathematically 0 ki power 0 is equal to 1 hota hai fir ye Armstrong number kaise ho sakta hai.
Sr kivy kab sikhavoge
yes !! same question harry bhai!
thanku
Thank you.
Please Upload a video for installing visual studio.
It will really be helpful for me.
There is already a video on visual studio code.....
Harry bhai Apne python biggener tutorial mein #59 mein abstraction and encapsulation ko switch kar diya hai . main vo playlist dekhra hun abhi main beginner hun..
bro you are awesome
I love the way when he told - samjha kar hi manunga.😂😂😂
How to convert answer to list in an interval
Like 1 to 100
1
2
3...
I want in [1,2,3..] ??
Great
Awesome bro
Uncle aap website mein commercial photos ke liye unplash aur pexels use karte hai. Aur ek website hai Pixbay. Uncle apko free commercial photos Pixbay se bhi milega
Bruhh django ki pura tutorial ek video meye laake upload kardo please
print(num, " ")
harry bhai aap toh padha kar nikal jate ho,
kabhi live session bhi kra kro
QnA type
1:41 was awesome 😅😅😅😂😂🤣🤣
You're amazing Harry sir💖
Error hoga kyuki n toh 0 hogaya, btw love your video❤
please make playlist on reactjs please you have created playlist of website development but reactjs is included in that so without reactjs its incomlete its necessary for web developer to learn reactjs also so please make reactjs playlist in hindi. i am searching for it so long but can't able to find a good teacher like you to make things easier to understand please please .
from your fan and student.
sir app kabhi unity 3d ka tutorial bnayenge
Harry bhai you are op 🤣🤣 Binod Number wali baat pr hasi aa gai😄😂
I have a question
How to find angles between two lines with numpy. Please tell me
Bhai Aapke har din 5000 subscribers badh rahe hai
Congo
You deserve a lot more
thank you harry bhai for giving a wonderful course of python
Harry bhai i have also a program can you please tell me how can i deliver to you for solution?