else: what happens otherwise
if temperature > 25:
say "Warm"
else:
say "Cool"
The condition must evaluate to Boolean. Pliro has no truthiness conversion.
The else clause is optional.
There is no elif or one-line else if form. Nest another if in the else
block:
if score >= 100:
say "Gold"
else:
if score >= 50:
say "Silver"
else:
say "Bronze"
Behavior and details
An else clause cannot stand alone. Align it with its matching if and provide a nonempty block. There is no else-if clause on one line; nest another if as shown.
Example
# language: en
let score = 5
if score >= 10:
say "A"
else:
if score >= 5:
say "B"
else:
say "C"
