-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoh.py
More file actions
95 lines (85 loc) · 2.1 KB
/
voh.py
File metadata and controls
95 lines (85 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import random
"""
=========
변수 결과
=========
===== ===== =====
결과
-------------------
count A B
===== ===== =====
1 win lose
2 lose win
3 draw draw
4 win lose
5 lose win
6 draw draw
7 win lose
8 lose win
9 draw draw
10 win lose
===== ===== =====
결과창..
===============
+------------+------------+-----------+
| Header 1 | Header 2 | Header 3 |
+============+============+===========+
| body row 1 | column 2 | column 3 |
+------------+------------+-----------+
| body row 2 | Cells may span columns.|
+------------+------------+-----------+
| body row 3 | Cells may | - Cells |
+------------+ span rows. | - contain |
| body row 4 | | - blocks. |
+------------+------------+-----------+
******************
1:가위 2:바위 3:보
******************
가위
#. 바위에 진다.
#. 보에 이긴다.
#. 가위에 비긴다.
바위
#. 바위에 비긴다
#. 보에 이긴다.
#. 가위에 진다.
보
#. 보에 비긴다
#. 가위에 진다.
#. 바위에 이긴다.
.. image:: images.png
:height: 200
:width: 400
:scale: 50
"""
def voh():
"""
1:가위 2:바위 3:보
"""
count = 0
while count<10:
a = random.randrange(1,4)
b = random.randrange(1,4)
if a == 1://가위
if b==2://바위
print("b:win a:lose")
elif b== 1://가위
print("draw draw")
elif b== 3://보
print("a:win b:lose")
elif a == 2://바위
if b==2://바위
print("draw draw")
elif b== 1://가위
print("a:win b:lose")
elif b== 3://보
print("b:win a:lose")
elif a == 3://보
if b==2://바위
print("a:win b:lose")
elif b== 1://가위
print("b:win a:lose")
elif b== 3://보
print("draw draw")
count+=1
voh()