Skip to main content

14. Program to find the square and find whether it is a perfect square

# Program to find and check the perfect square

b=0
def square(digit):
    while True:
        for i in range(0,int(digit/2)):
            b=i*i
            if(b==digit):
                return(i)
        if(b!=digit):
           return(-555)y
number=int(input('enter the number to be find perfect square root '))
a=square(number)
if(number==a*a):
    print(number,' is a perfect square')
    print('the square root of',number,'is',a)
else:
    print('Since!',number,'is not a perfect square of any number ')
    print('sorry! ',number,'does not have  perfect square root')


Comments

Popular posts from this blog

BEE ASSIGNMENT

 Here is the solution of BEE ASSIGNMENT    QUESTION 1 - QUESTION 5 Question 6 to Question 10  For maths assignment : click here  

Programming for problem solving : Assignment no 1

 Assignment of programming for problem solving:  The questions for assignment is : The solution for the assignment is as follows :  Please subscribe the blog for more updates . Thank you! 🙏🙏

MATHEMATICS ASSIGNMENT 1

Here is the solution of mathematics assignment 1 . One question is not done. Please provide the correct solution for that question.  Solution of the assignment is as follows: For BEE NOTES : CLICK HERE For MATHS NOTES : CLICK HERE