Grade letter · 等第字母
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
Grade letter
mark is 72. Print A for 80 and above, B for 70 to 79, C for 60 to 69, and D below that.
Order matters. Because Python stops at the first true test, checking >= 60 first would give C to every good mark. Start at the top and work down.
中文
等第字母
mark 是 72。80 及以上打印 A,70 到 79 打印 B,60 到 69 打印 C,再低打印 D。
顺序很重要。因为 Python 在第一个成立的判断处就停下,先判断 >= 60 会让所有高分都变成 C。要从高往低写。
mark is 72. Print A for 80 and above, B for 70 to · 到 79, C for 60 to · 到 69, and D below that. · mark 是 72。80 及以上打印 A,70 到 79 打印 B,60 到 69 打印 C,再低打印 D。
Click Run to see the output here. · 点击“运行”查看此处输出。