EasyOutput prediction
Nested ternary expression
What does this code print?
n = 0
result = "positive" if n > 0 else ("negative" if n < 0 else "zero")
print(result)← → arrow keys to navigate
Sign in to save your progress.
What does this code print?
n = 0
result = "positive" if n > 0 else ("negative" if n < 0 else "zero")
print(result)← → arrow keys to navigate
Sign in to save your progress.