Python Program to input any number and check whether it is automatic or not


n=0

cnt=0

n=int(input('Enter any no...'))

sq=n**2

print(sq)

while(n>0):

  cnt=cnt+1

  n=n//10

no=sq%(10**cnt)

print(no)

if(n==no):

  print('The no. is automorphic')

else:

  print('The no. is not automorphic') 

Comments

Some popular posts

Python Program that computes the net amount of a bank account based a transaction log from console input.