Robotics & Artificial Intelligence
When a code allows to use one loop inside another loop, known as ……………
- finite loop
- loop in loop
- nested loop
- infinite loop
Python Control Flow
2 Likes
Answer
nested loop
Reason — A loop written inside another loop is called a nested loop. In this type of loop, the inner loop executes completely for every iteration of the outer loop.
Answered By
1 Like
Related Questions
Using …………… loop, an infinite loop can be created.
- Fixed iterative loop
- while
- for
- all
A loop statement is given as:
for i in range(10):For how many times will the given loop statement be executed?
- none
- 9 times
- 10 times
- infinite
Predict the output of the following snippet:
m, n = 2, 15 for i in range(1, 5): m = m + 1 n = n - 1 print("m =", m) print("n =", n)Predict the output of the following snippet:
k = 1 i = 2 while(i < 6): k = k * i i = i + 1 print(k)