diff --git a/diy1.py b/diy1.py index a9967d2..f8b3566 100644 --- a/diy1.py +++ b/diy1.py @@ -3,4 +3,10 @@ player=input("石头/剪刀/布:")# 玩家出拳 print("玩家出拳:"+player) list=["石头","剪刀","布"] computer=random.choice(list) -print("计算机出拳:"+computer) \ No newline at end of file +print("计算机出拳:"+computer) +if player == computer: + print("平局") +elif (player=="剪刀" and computer=="布") or (player=="布" and computer=="石头") or (player=="石头" and computer=="剪刀"): + print("恭喜你,你赢了!") +else: + print("真可惜,你输了。") \ No newline at end of file