diff --git a/diy1.py b/diy1.py index 535b8fc..b4f4f17 100644 --- a/diy1.py +++ b/diy1.py @@ -2,4 +2,11 @@ player=input("请出拳:石头/剪刀/布")# 玩家出拳 print("玩家出拳:"+player) import random list=["石头","剪刀","布"] -computer=rondom.choice(list) \ No newline at end of file +computer=rondom.choice(list) +print("计算技术出拳:"+computer) +if player in list: + if player==computer: + print("平局") + elif (player=="石头" and computer=="剪刀") + (player=="剪刀" and computer=="布") +