In short
An if statement runs a block of code only when a condition is true. With elif and else, it chooses between several blocks.
The condition is a test that gives True or False, such as score >= 40. The block that belongs to the if is indented. Python checks the if first, then each elif in order, and runs the first block whose condition is true. The else block runs if none are true. Conditions can be combined with and, or and not.
This prints B.
Python labs run in your browser. Type the code, run it and see what happens.
Open a Python lab