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 · 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.
日本語
自分で書く
2つの数字のうち大きい方を返すbiggest(a, b)を書きます。maxは使わないでください。
これで3つの部分すべてを手に入れました:2つの名を持つdefの行、その中のif/else、および各パス上のreturnです。すべてのパスで何かを返す必要があります。
Write biggest(a, b) that gives back the larger of the two numbers. Do not use max. · 2つの数字のうち大きい方を返すbiggest(a, b)を書きます。maxは使わないでください。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。