+ 2
Neon Number
Program to check whether the given number is a neon number?
3 Réponses
+ 6
a=int(input())
if sum(list(map(int,list(str(a)))))**2==a:
print("Neon number!")
else:
print("Not a neon number!")
+ 1
#Program to check Neon Number
def fun_neon():
num=int(input("Enter a Number:"))
var_sq=num**2
temp=var_sq
sum=0
while temp!=0:
rem=temp%10
sum=sum+rem
if sum==num:
print('{0}is Neon Number'.format(num))
else:
print('{0}is Not a Neon Number'.format(num))
fun_neon()