Python Function which prints square of given number.

#Python Function which prints square of given number.

def sqr(a):
	return (a*a)    
print("Enter a digit to find square : ")
a = int(input())
ans=sqr(a)
print("\nSquare of ", a ," : ", ans)

Output :
Enter a digit to find square : 5

Square of 5 : 25



Leave a comment