fork download
  1. # your code goes here
  2. import math
  3.  
  4. x = int(input('Enter an integer: '))
  5.  
  6. if x ** 3 == abs(x):
  7. print(math.sqrt(x))
  8. if x < 0:
  9. ans -= ans
  10. print('Cube root of') + str(x) + 'is' + str(ans)
  11. else:
  12. print (x, 'is not a perfect cube')
  13.  
  14.  
Success #stdin #stdout 0s 23352KB
stdin
1
stdout
Enter an integer: 1.0