Skip to content

Commit 02adb1f

Browse files
authored
Update Spy_number.py
1 parent 2793f95 commit 02adb1f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Spy_number.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
1+
num=int(input("Enter your number "))
2+
sum=0
3+
product=1
4+
num1 = num
5+
6+
while(num>0):
7+
d=num%10
8+
sum=sum+d
9+
product=product*d
10+
num=num//10
11+
12+
if(sum==product):
13+
print("{} is a Spy number!".format(num1))
14+
else:
15+
print("{} is not a Spy number!".format(num1))

0 commit comments

Comments
 (0)