From 2412a41916cd62c260c4e491212463198fae69c3 Mon Sep 17 00:00:00 2001 From: BHUKYA-BALASWAMY-NAYAK Date: Thu, 27 Jun 2024 15:49:11 +0530 Subject: [PATCH] Create baluB.py --- baluB.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 baluB.py diff --git a/baluB.py b/baluB.py new file mode 100644 index 0000000..9099c9f --- /dev/null +++ b/baluB.py @@ -0,0 +1,12 @@ + +num = int(input("Enter a number: ")) +sum = 0 +temp = num +while temp > 0: + digit = temp % 10 + sum += digit ** 3 + temp //= 10 +if num == sum: + print(num, "is an Armstrong number") +else: + print(num, "is not an Armstrong number")