Robotics & Artificial Intelligence

Which of the following statement is a fixed iterative loop?

  1. for
  2. while
  3. if
  4. if-else

Python Control Flow

3 Likes

Answer

for

Reason — The for loop is the best example of a fixed iterative loop because the number of iterations is known and fixed in advance using the range() function or any other iterable.

Answered By

1 Like


Related Questions