+ 1
Wap to print a neon number using while loop in python?
like if( 9**2)=81 then, 8+1=9 which is equal to initially taken no. 9
3 odpowiedzi
0
n = int(input())
s = n**2
sum=0
while s:
sum=sum+(s%10)
s=s//10
if sum==n:
print(n,"is a neon number")
else:
print(n,"is not a neon number")
0
thanks
0
a=int(input("enter one number here"))
x=a*a
num1=x%10
num2=x//10
num3=num1+num2
if num3==a:
print("this is a Neon number")
else:
print("this is not a Neon number")
you do not even need to use while loop