Write one yourself · 自己写一个
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 基础 · Functions · 函数 →
English
Write one yourself
Write biggest(a, b) that gives back the larger of the two numbers. Do not use max.
Now all three parts are yours: the def line with its two names, an if/else inside it, and a return on each path. Every path must return something.
中文
自己写一个
写一个 biggest(a, b),返回两个数中较大的那个。不要用 max。
现在三个部分都由你来写:带两个参数名的 def 那一行、里面的 if/else,以及每条路径上的 return。每一条路径都必须返回点什么。
Write biggest(a, b) that gives back the larger of the two numbers. Do not use max. · 写一个 biggest(a, b),返回两个数中较大的那个。不要用 max。
Click Run to see the output here. · 点击“运行”查看此处输出。