Pass or fail · 及格还是不及格
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
This one builds on a lesson you haven't finished yet. Do that lesson first: · 此任务基于您尚未完成的课程。请先完成以下课程:
Python Basics · Python 基础 · Making decisions · 做出判断 →
English
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 是 47。当分数大于或等于 50 时打印 pass,否则打印 fail。
else 接住 if 没有接住的所有情况。它自己不带条件 —— 就写 else: —— 下面再写它自己缩进的那一行。
mark is 47. Print pass when the mark is 50 or more, and fail otherwise. · mark 是 47。当分数大于或等于 50 时打印 pass,否则打印 fail。
Click Run to see the output here. · 点击“运行”查看此处输出。