title: Program to find cuberoot of a number
body: <p>So I'm a complete beginner (like less than a week) and wrote this code in python. It's supposed to find the cuberoot of a number if the solution is an integer, and approximate it otherwise. It does both instead of just one or the other. I've tried it multiple ways for hours now but it doesn't work. Any suggestions?</p>
  
  <pre><code>cube=int(input("what number's cube root do you want to find"))
  epsilon = 0.01
  increment = 0.0001
  num_guesses = 0
  for guess in range(cube+1):
  if guess**3 == cube:
      guess += 1
      print (guess)
  else:
  guess1 = 0.0
      while abs(guess1**3 - cube) &gt;= epsilon:
          guess1 += increment
          num_guesses += 1
          print('num_guesses =', num_guesses) 
  
      else:
          print(guess1)
  </code></pre>