Add two numbers you were given · 与えられた2つの数字を加算
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
Add two numbers you were given
Read two whole numbers, one per line, and print their total. For 3 and 4, print 7.
Two reads, two int(...), then one +. Forget one int and you get 34 instead of 7 — Python joined the text rather than adding the numbers.
日本語
与えられた2つの数字を加える
1行ずつ2つの整数を読み取り、その合計を出力します。3と4の場合は7を出力します。
2回の読み込み、2つの int(...) 、そして1つの + 。 int を1つ忘れると、 34 が 7 の代わりに得られます — Pythonは数字を加算するのではなくテキストをつなぎました。
Read two whole numbers, one per line, and print their total. For 3 and 4, print 7. · 1行ずつ2つの整数を読み取り、その合計を出力します。3と4の場合は7を出力します。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。