Robotics & Artificial Intelligence
Fill in the blanks:
- ……………. is used to repeat a block of code until a certain condition is met.
- ……………. statement in a loop is used to break the execution of the loop.
- ……………. keyword is used to create an empty loop.
- ……………. statement is used to skip the current iteration of the loop and move to the next.
- ……………. loop is used to iterate over a sequence of items.
Python Control Flow
1 Like
Answer
- while loop is used to repeat a block of code until a certain condition is met.
- break statement in a loop is used to break the execution of the loop.
- pass keyword is used to create an empty loop.
- continue statement is used to skip the current iteration of the loop and move to the next.
- for loop is used to iterate over a sequence of items.
Answered By
2 Likes
Related Questions
From the following, which is not a comparison operator in Python?
- ==
- !=
- >=
- <>
What would be the result of the following expression?
15 > 12 and 2 < 1- True
- False
- Error
- None of these
Explain the use of break statement in Python with the help of an example.
Write a program to find the smallest number among three numbers by using the nested 'if-else' statements.