Python Programming - Conditional Statements - Discussion

Discussion Forum : Conditional Statements - General Questions (Q.No. 28)
28.
What will be the output of the following code?
value = True
result = "Yes" if value else "No"
print(result)
Yes
No
True
False
Answer: Option
Explanation:
The code uses a conditional expression to assign "Yes" to the variable result if value is True, otherwise it assigns "No."
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.