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)
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:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers