Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

An-3

  • 3 years ago

def sqrt(a): def tryit(x): return 0.5 * (a/x + x) return fixedPoint(tryit(a), 0.0001) This code has a bug in it. You can fix this by correcting exactly one line of the definition. Please do so in the box below.

  • This Question is Open
  1. bwCA
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    what does fixedPoint() expect for its first argument?

  2. Chris2332
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    If you try to create the framework around it and actually run the code, you will see that it complains about one of the arguments. It should be straight forward...

  3. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy