Welcome to the Python Programming – Complete Course (New Series) by Burle Sharma.
In this class (3.24), we solve an important and popular number problem:
👉 Write a program to accept a number and check whether it is an Armstrong number or not.
An Armstrong number is a number where the sum of the digits raised to the power of number of digits is equal to the original number.
In this video, I have:
✔ Written the expected output clearly
✔ Explained the problem statement properly
✔ Written the complete program
✔ Performed a detailed dry run step-by-step
✔ Executed the program and verified the output
🎓 What You’ll Learn in This Video
• Understanding Armstrong number concept
• Counting number of digits
• Extracting digits from a number
• Using power logic inside loop
• Using accumulator variable (sum)
• Applying while loop effectively
• Performing detailed dry run
🧠 Program: Check Armstrong Number
Example:
Input: 153
Digits → 1, 5, 3
Number of digits = 3
Calculation:
1³ + 5³ + 3³ = 1 + 125 + 27 = 153
Output:
Armstrong Number
Logic
✔ Accept a number from the user
✔ Store original number
✔ Count total digits of the number
✔ Initialize sum = 0
✔ Use while loop to process each digit:
• Extract digit using %
• Calculate digit^count
• Add to sum
• Remove digit using //
✔ Compare sum with original number
✔ If equal → Armstrong number
✔ Else → Not an Armstrong number
🧠 Key Learning Point
Armstrong number program combines multiple concepts:
✔ Digit counting
✔ Digit extraction
✔ Power calculation
✔ Loop control
✔ Conditional checking
👉 This program is a perfect example of applying multiple logics in one solution.
🎯 Why This Video Is Important
This program helps students:
• Strengthen logical thinking
• Combine multiple programming concepts
• Prepare for exam and interview questions
• Build confidence in solving complex number problems
Armstrong number is one of the most commonly asked questions in programming.
#Python #PythonProgrammingNewSeries #BurleSharma
#ArmstrongNumber
#WhileLoopPython
#DigitPrograms
#NumberPrograms
#PythonBeginners
#PythonDryRun
#Geecoding #PythonClass24
On this page of the site you can watch the video online 3.24 – Armstrong Number Program Using While Loop | Python Programming – New Series with a duration of hours minute second in good quality, which was uploaded by the user Burle Sharma (geecoding) 24 March 2026, share the link with friends and acquaintances, this video has already been watched 5 times on youtube and it was liked by 1 viewers. Enjoy your viewing!