0
You're a MVP if you can solve this easy problem!
#Find the cube root of a perfect cube x= int(raw_input('Enter an integer:') for integer in range (0, ab(x)+1): if integer**3 == abs(x): break if integer**3 != abs(x): print('x is not a perfect cube') else: if x<0: integer = - integer print('Cube root' + str(x) + 'is' + str(integer) Why does it says the colons are syntax errors? What is messing up the code from executing?
2 Answers
+ 10
In third line , if integer**3==abs(x): You missed the ':' colon there. đ»
+ 3
The fourth line:
if integer**3 == abs(x)
is missing ':' colon there