Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python perfect square

import math

def is_square(n):
    return n > -1 and math.sqrt(n) % 1 == 0


# Taking the input from user
number = int(input("Enter the Number: "))
if is_square(number):
    print(f'Your number: {number} is perfect square.')
else:
    print(f'Your number: {number} is not perfect square.')
Comment

PREVIOUS NEXT
Code Example
Python :: desktop background change with python 
Python :: anaconda-navigator command not found 
Python :: install googlesearch for python 
Python :: python filter None dictionary 
Python :: supprimer fichier pythpn 
Python :: print current time hours and minutes in python 
Python :: syntax to update sklearn 
Python :: dictionary with numbers python 
Python :: create new django app 
Python :: python function to print random number 
Python :: python tk fullscreen 
Python :: python find all pairs in list 
Python :: fibonacci series python recursion 
Python :: how to minimize tkinter window 
Python :: python random randint except a number 
Python :: python calculate computation time 
Python :: pandas count specific value in column 
Python :: pandas determine percentage of nans in column 
Python :: how to check opencv version using python 
Python :: pyautogui keyboard write 
Python :: discord.py set activity 
Python :: shift elements in list python 
Python :: f-string ponto decimal python 
Python :: django python base 64 encode 
Python :: how to play sound after pressing a button in tkinter 
Python :: covariance matrix python 
Python :: read csv python pandas plot 
Python :: how to multi random pick from list python 
Python :: python prompt for input 
Python :: marks input using list in python 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =