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?

12th Mar 2017, 10:21 PM
Andrew Rivera
Andrew Rivera - avatar
2 Respostas
+ 10
In third line , if integer**3==abs(x): You missed the ':' colon there. 👻
17th Feb 2017, 5:45 AM
Mr.Robot
Mr.Robot - avatar
+ 3
The fourth line: if integer**3 == abs(x) is missing ':' colon there
17th Feb 2017, 6:15 AM
Deddy Tandean