Vérifiez si un nombre est un cube parfait en python
x = int(input())
print(int(round(x ** (1. / 3))) ** 3 == x)
Strange Seal
x = int(input())
print(int(round(x ** (1. / 3))) ** 3 == x)
import math
# Taking the input from user
number = int(input("Enter the 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")
print(int(int(n)**.5))
import math
def is_perfect_square(number: int) -> bool:
"""
Returns True if the provided number is a
perfect square (and False otherwise).
"""
return math.isqrt(number) ** 2 == number