forked from HelloCoding22/Python-Game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.py
More file actions
35 lines (31 loc) · 867 Bytes
/
Copy pathgame.py
File metadata and controls
35 lines (31 loc) · 867 Bytes
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
# 도둑질
import random
num1 = int(input("하나만 골라 : 가위(0), 바위(1), 보(2) :"))
num2 = random.randrange(0, 3)
if num2 == 0:
print("컴퓨터는 가위를 냈습니다.")
elif num2 == 1:
print("컴퓨터는 바위를 냈습니다.")
else:
print("컴퓨터는 보를 냈습니다.")
if num1 == 0:
if num2 == 1:
print("컴퓨터가 이겼습니다")
elif num2 == 2:
print("당신이 이겼습니다.")
else:
print("비겼습니다.")
elif num1 == 1:
if num2 == 0:
print("당신이 이겼습니다.")
elif num2 == 2:
print("컴퓨터가 이겼습니다.")
else:
print("비겼습니다.")
else:
if num2 == 0:
print("컴퓨터가 이겼습니다")
elif num2 == 1:
print("당신이 이겼습니다.")
else:
print("비겼습니다.")