Skip to content · ⁨コンテンツへスキップ⁩

The bigger number · ⁨より大きな数⁩

English

The bigger number

a is 8 and b is 15. Store the bigger of the two in biggest. Do not use max.

A branch can set a variable, not only print. Give biggest a value on both paths, or one path leaves it undefined and Python says NameError.

日本語

大きい方の数字

a は 8 で、b は 15 です。2つのうち大きい方を biggest に格納します。max を使用しないでください。

分支(ブランチ)は変数を出力するだけでなく設定できます。biggest に両方の経路で値を割り当てない場合、一方の経路では未定義のままになり、Python は NameError を報告します。

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP