Learn the bisection method

Steps 11 and 12:
I don’t see the need to use _ in the for as an element, and I don’t think the range() function has been seen before.

1 Like

Please provide a link and code. Thanks

the underscore is a placeholder for an unused variable, and we don’t use the variable of the loop

for range you are right, I will open an issue to document this and fix it

1 Like

I’m copying the statements of the exercises :

Step 11 Passed

Now you’ll repeatedly narrow down the interval by finding the midpoint of the current interval and comparing the square of the midpoint with the target value.

For that, inside the else block, create a for loop that runs up to max_iterations times.

Ok for the underscore; it was not clear for me.
Thank you for your interest.

Why not share the actual links instead?

https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-list-comprehension-by-building-a-case-converter-program/step-11

1 Like

If _ isn’t explained, it should be as well.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.