Ask for a name · 名前を質問
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 · Getting input · 入力の取得 →
English
Ask for a name
input() reads one line that the user types. Store it in a box, then use it.
When you press Run, the program waits: a highlighted box appears under the code. Type a name there and press Enter. Check answer types Sam for you.
日本語
名前を聞く
input() は、ユーザーが入力した1行のテキストを読み取ります。それを箱に格納し、その後使用します。
実行を押すと、プログラムは待機します: コードの下にハイライトされた箱が表示されます。そこに名前を入力してEnterキーを押します。回答を確認では Sam が自動で入力されます。
Read a name with input(). Then show Hi, + the name + !. For Sam, show Hi, Sam!. · input() で名前を読み取ってください。その後、Hi, + 名前 + ! を表示してください。Sam の場合、Hi, Sam! を表示します。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。