Created
October 27, 2023 09:58
-
-
Save SnowyPainter/daf7fa6a0ee6ea7379c9b7458cf5c42d to your computer and use it in GitHub Desktop.
wjdqhtngod.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
computer = random.randint(1,3) | |
player = int(input("가위, 바위, 보 중 하나를 선택하시오. (가위=1, 바위=2, 보=3): ")) | |
if computer == player: | |
print("비겼습니다.") | |
elif player == 1: | |
if computer == 2: | |
print("졌습니다 (가위<바위)") | |
else: | |
print("이겼습니다 (가위>보)") | |
elif player == 2: | |
if computer == 3: | |
print("졌습니다 (바위<보)") | |
else: | |
print("이겼습니다 (바위>가위)") | |
elif player == 3: | |
if computer == 1: | |
print("졌습니다 (보<가위)") | |
else: | |
print("이겼습니다 (보>바위)") | |
else: | |
print("잘못된 입력입니다") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment