Robotics & Artificial Intelligence
In Python, 'elif' can be used without 'if'.
Python Control Flow
1 Like
Answer
False
Reason — The elif statement cannot be used independently. It must always be used after an if statement to check an additional condition.
Answered By
2 Likes
Related Questions
The 'while' loop can be used to create an infinite loop.
A loop inside a loop is called nested loop.
Which of the following keywords is not used in conditional statements?
- if
- else
- elif
- go
What will be the output of the following statement for any two values of a & b entered by the user?
print(a) if a>b else print(b)- It will give an error
- It will print the largest number
- It will print the smallest number
- None of these