Python Armstrong Number Program (For 3 Digit Number) - In Hindi

preview_player
Показать описание
Python Armstrong Number Program - In Hindi - Tutorial #24

In this video, I have explained a program to check whether a given number is Armstrong number or not. An Armstrong number is one whose sum of cube of each digits is equal to the number itself.
For Example if the given number is 153 then we have to find the sum of cube of its digits i.e. 1^3+5^3+3^3 = 153 and since the result is equal to the number itself, it is an Armstrong Number.

We will do the Armstrong Number program using While statement. While statement is used to execute a single statement or a block of statement n times till the condition is true. Every loop must contain three parts:

1. Initialization of counter variable.
2. Condition
3. Increment/Decrement of counter variable

While loop or any loop will work fine if all the three parts are there in the programs. If any one is missing the loop will not run properly.

Tags Used:

armstrong number
python
programming
python tutorials in hindi
python programs
python examples
armstrong number programs
armstrong or not
program to check for armstrong
armstrong,number
program
armstrong numbers
programs
interview
number programs
numbers
program to find armstrong
program to check a number is armstrong or not
Python Armstrong Number Program

#codeitup
#whileloop
#python
Рекомендации по теме
Комментарии
Автор

Sir..I want to say something. I watched several videos on YouTube but I didn't understand from any videos.. suddenly I got ur video Its really surprised for me because it's really amazing the way of teaching 👌😊.. right now my each and every concept becomes clear..I appreciate your efforts and ur knowledge... THANK YOU ❤️ SIR

mdshahid
Автор

Logic was so simple to understand. I'm from non IT background and your channel is perfect for understanding the basic.

sudeep
Автор

before i found your video i had to look for many videos yet difficult to understand but when i started looking yours i understand it and saved a lot of time.thankyou

nivashrestha
Автор

You're the best teacher of computer science!
Thankyou very very much sir!

aaryaa
Автор

Sir, maine saal ke beech mein cs li hai, scul mein kuch samajh nhi aa rha tha, yt par bhatakte aapke channel par aaya seriously aap boht acche se samjhaate ho, ab sab ho jaata hai
All thanks to u sir😄😊

tusharkumar
Автор

Your teaching skill is exceptionally phenomenal❤❤

rakhidas
Автор

Thanks bro. My Python Exam in tomorrow. I leaved class from 13 days .but I watch your video and practice in home. Thanks bro thanks bro

sugamer
Автор

Jese Apne Smjhaya H... koi baccha Bhi smjh Jaye ga, ❤️❤️❤️❤️👌👌👌👌 nice guruji

hemants
Автор

Best videos in the you tube for beginners

vinaychandrakar
Автор

THANK YOU SIR. You and Your teaching is unique and excellent.

SurajKumar-jwjo
Автор

Sir you are great the way you explain coding with example is totally amazing and easy to understand
I am so greatful to be your online student❤☺

riyak
Автор

Nice explanation..!!!
But this program is for 3-digit numbers only.

AksaMWani
Автор

The way you teach everyone will learn sir.

arkyaacharya
Автор

Another alternative method to calculate the Armstrong Number:

### Get the number
n = int(input("Enter the number: "))


### Convert to string
n1 = str(n)


### String Count
count = len(n1)


### add string to list
n1 = [int(i) for i in n1]


### find the power of each number by its count and store in D list
D = [ ]
for i in n1:
j = i ** count
D.append(j)

### Initiate the dummy variable for the addition of list
sums = 0


for num in D:
sums += num

### Driver function to check the number is Armstrong or not.
if n == sums:
print("Its Armstrong Number.")
else:
print("Not an Armstrong number.")

shaileshsarda
Автор

Sir the way u teach is very awesome I'm doing MCA & python is there in my syllabus & it's really great to learn from your YouTube video.

_.Wanderlust_.
Автор

Too much simplicity in u'r video's.. Really I like it.. 🙌

pratibhasalunke
Автор

Perfectly Explained, I understood totally, Thank you sir... I like the way you teach, always from basic...

AbhishekKumar.connects
Автор

Thanks sir you give with best teaching way I like your way love and thanks Allah pak apko mazeed kamyab kary AMeen

Aqeelkhan-nksk
Автор

I will definitely share your videos with my friends.

SurajKumar-jwjo
Автор

Sir armstrong number is not only used for doing cube of any number it is used for doing the power of the total number of digits available in original number

For example,
abcd=

Here there are four digits in abcd number then it is used as 4 power of all the elements of abcd number

normalman