import math 
      # take inputs
      num = int(input('Enter number: '))
      root = math.sqrt(num)
      # check number is perfecct square
      if int(root + 0.5) ** 2 == num:
          print(num, 'is a perfect square')
      else:
          print(num, 'is not a perfect square')
      
      Python language logo

      PerfectSquare

      0

      0

      avatar
      Mahendra Kumar
      basicMaths
      beginner

      To find whether the given number is a perfect square or not.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.