What is the output of the Python code? x = 10 if x > 5: print("x is greater than 5") elif x == 10: print("x is 10") else: print("x is less than or equal to 5") a) x is greater than 5 b) x is 10 c) x is less than or equal to 5 d) No output
13
0
11
2K
2
@PythonDQ A.. because the condition is true so it will not proceed to checking other conditions
@PythonDQ x is greater than 5. once the condition is met, no other checking is performed. But wow...been some years since I looked at Python
@PythonDQ A. It's greater than 5, so it exits after fulfilling the condition.