Which of the following is not used as conditional statement in Python?

25. Which of the following is not used as conditional statement in Python?

  1. switch
  2. if...else
  3. elif
  4. None of the mentioned above

Answer: A) switch

Explanation:

Python does not have a switch or case statement like other programming languages. Because Python lacks switch statement functionality in comparison to other programming languages, it is not recommended for beginners. As a result, we use other alternatives that can replace the functionality of the switch case statement and make programming easier and faster. We employ dictionary mapping to get around this limitation.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.