⇤ ← Revision 1 as of 2018-10-14 21:52:58
Size: 1007
Comment:
|
Size: 1007
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 10: | Line 10: |
## Python/Prog/Practice/Extended/02/EP_001a/Abstract | ## Python/Prog/Practice/Extended/02/EP_003a/Abstract |
Line 17: | Line 17: |
## Python/Prog/Practice/Extended/02/EP_001a/Hints | ## Python/Prog/Practice/Extended/02/EP_003a/Hints |
Line 24: | Line 24: |
## Python/Prog/Practice/Extended/02/EP_001a/Screen | ## Python/Prog/Practice/Extended/02/EP_003a/Screen |
Line 31: | Line 31: |
## Python/Prog/Practice/Extended/02/EP_001a/Digest | ## Python/Prog/Practice/Extended/02/EP_003a/Digest |
Line 38: | Line 38: |
## Python/Prog/Practice/Extended/02/EP_001a/Distribution | ## Python/Prog/Practice/Extended/02/EP_003a/Distribution |
概要
*
ヒント
この課題で使うPythonの機能 (学習のヒント)
[ edit ]
- この課題で使うPythonの機能 (学習のヒント)
この課題の解き方 (問題解決のヒント)
[ edit ]
- この課題の解き方 (問題解決のヒント) ....
文字列で与えられた二つの「手」から,勝敗を返す関数janken_judge_str( hand1, hand2 )を定義することができます.
- 単純に,if-elif-else文で書けそうですね.
0,1,2で,じゃんけんの「手」を表現すると,簡単な計算で,勝敗を0(あいこ), 1(勝ち), 2(負け)で求める関数janken_judge(h1, h2)も定義できます.
- 更にヒント: 剰余系を使います.
実行例
*
プログラム例: 本質的な部分 (授業中に順次公開します)