Amongst which of the following is / are the conditional statement in Python code?

24. Amongst which of the following is / are the conditional statement in Python code?

  1. if a<=100:
  2. if (a >= 10)
  3. if (a => 200)
  4. None of the mentioned above

Answer: A) if a<=100:

Explanation:

The if statement in Python is used to make decisions in various situations. It contains a body of code that is only executed when the condition specified in the if statement is true; if the condition is not met, the optional else statement is executed, which contains code that is executed when the else condition is met.

Comments and Discussions!

Load comments ↻






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