diff --git a/src/isPerfectSquare.py b/src/isPerfectSquare.py new file mode 100644 index 0000000..03e1286 --- /dev/null +++ b/src/isPerfectSquare.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Fri May 31 10:38:19 2019 + +@author: aranjan5 +""" + + +import sys, math + +def isPerfectSquare(num): + if(int(math.sqrt(num))==float(math.sqrt(num))): + return 1 + else: + return 0 + +# find all perfect squares below a given input diff --git a/src/perfectSquaresLessThanInput.py b/src/perfectSquaresLessThanInput.py new file mode 100644 index 0000000..19d87c3 --- /dev/null +++ b/src/perfectSquaresLessThanInput.py @@ -0,0 +1,2 @@ +# function to find all perfect squares less than a given input +