From 973666c6547af5c0f422cf623e73985ea9f5e563 Mon Sep 17 00:00:00 2001 From: aranjan5 Date: Fri, 31 May 2019 10:54:07 +0530 Subject: [PATCH 1/2] added function to find perfect square --- src/isPerfectSquare.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/isPerfectSquare.py 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 From 04b3dcdbcb46dc03b171d2b4b759f31835ba0e7d Mon Sep 17 00:00:00 2001 From: aranjan5 Date: Fri, 31 May 2019 10:58:04 +0530 Subject: [PATCH 2/2] added a new issue --- src/perfectSquaresLessThanInput.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/perfectSquaresLessThanInput.py 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 +