Pass or fail
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
This one builds on a lesson you haven't finished yet. Do that lesson first:
Python Basics · Making decisions →
Pass or fail
mark is 47. Print pass when the mark is 50 or more, and fail otherwise.
else catches everything the if did not. It takes no condition of its own — just else: — and its own indented line underneath.
mark is 47. Print pass when the mark is 50 or more, and fail otherwise.
Click Run to see the output here.