elifExpert Playground

Short for 'else if'; adds another condition to an if chain

Python Playground
Output
Click "Run" to execute your code

elif compiles to a chain of compare + conditional jump instructions. Unlike switch/case in C, there is no jump table — each condition is evaluated one by one until a match is found.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?