プログラミングをしていると、「ある条件の結果に応じて、変数に入れる値を変えたい」という場面は頻繁に訪れます。 「会員ランクがゴールドなら送料は0円、そうでなければ500円」 「点数が合格点以上なら"合格"、そうでなければ"不合格"」 通常、これ ...
In Python, we use the `if` statement to create programs that can make decisions. The syntax of the `if` statement is: If `test_condition` is `True`, the body of the `if` statement is executed. However ...
3.1 Write a program to prompt the user for hours and rate per hour using raw_input to compute gross pay. Pay the hourly rate for the hours up to 40 and 1.5 times the hourly rate for all hours worked ...
Pythonでスクリプトを書いていると、決まった処理を自動で流すだけでなく、「実行中にユーザーに名前を入力させたい」や「コマンドを受け取って処理を変えたい」といった、対話的な(インタラクティブな)機能を持たせたくなることがあります。
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する