import math number = int(input("Enter a number")) root = math.sqrt(number) if int(root+0.5)** 2 == number: print(number, "is a perfect square") else: print(number, "is not a perfect square") 'float' object is not callable can you help me fix the python code so I dont get this typeerror The original assignment was to create a perfect square python program and I have had so much trouble.
import math
number = int(input("Enter a number"))
root = math.sqrt(number)
if int(root+0.5)** 2 == number:
print(number, "is a perfect square")
else:
print(number, "is not a perfect square")
'float' object is not callable
can you help me fix the python code so I dont get this typeerror
The original assignment was to create a perfect square python program and I have had so much trouble.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
could you help me make it a loop. I understand you would use a statement like while or else to loop. Im trying to make it so if it is not a perfect square it will prompt the user to enter another number and try again?
I still get the TypeError 'float' object is not callable. Can you help me figure out why I keep getting this error. My program is also the same as the one that was corrected.
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)