#---------------------------- Check whether a number is square number ------------------------
print("Check Square number")
print()
n =int(input("Enter the number:"))
sqr= n**(0.5) # n** (1/2)
if(sqr== round(sqr)):
print(n,"is square number")
else:
print("Not square number")
#---------------------------- find the square of a number -----------------------------------
num = int(input("Enter a number : "))
sqr = num *num
print("The Square value of ",num,"is",sqr)
#---------------------------- find the square of a number (method 2) ------------------------
num = int(input("Enter a number : "))
sqr = num **2
print("The Square value of ",num,"is",sqr)
#---------------------------- find the square of a number (math module) ---------------------
import math # pip install math
num =int(input("Enter th enum: "))
sqr = int(math.pow(num,2)) # math.pow(number,power)
print("The square value of ",num,"is",sqr)
#---------------------------- find the square of all odd number in range---------------------
n = int(input("Enter no.of elements : "))
start = int(input("Enter the start "))
for i in range(start,start+n):
if i%2 !=0:
sqr= i **2
print("The square value of",i,"is",sqr)
print('.....')
#---------------------------- find the square of all evennumber in range---------------------
n = int(input("Enter no.of elements : "))
start = int(input("Enter the start "))
for i in range(start,start+n):
if i%2 ==0:
sqr= i **2
print("The square value of",i,"is",sqr)
print('.....')