Question: in python please, Background In mathematics, a perfect square is an integer that is the square of an integer. In other words, a perfect square
in python please, Background In mathematics,
a perfect square is an integer that is the square of an integer. In other words, a perfect square is the product of an integer with itself. (Source: Wiki)
For example:
1 is a perfect square since it can be written as 11
64 is a perfect square since it can be written as 88
81 is a perfect square since it can be written as 99
Instructions;
Write a program that can determine whether a number is a perfect square. The main() function will just include a simple loop which asks users to input an integer number and call an identification function to determine whether the input integer number is a perfect square or not. After each identification process, the program will keep asking user to make input until user input -1 (see sample output). To process each user input, write a function that will take an integer number as parameter and returns True/False if the integer is/isnt a perfect square. You can use the following function declaration: def isPerfectSquare(n)
Sample Output Perfect Square Identifier (enter -1 to quite)
Please enter a number: 10 [Enter]
10 is not a Perfect Square. Please enter a number: 64 [Enter]
64 is a Perfect Square. Please enter a number: -64 [Enter]
-64 is not a Perfect Square. Please enter a number: -1 [Enter]
Goodbye. :) End of processing...
in python please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
