diff --git a/sd.py b/sd.py index 10c881b..31e2173 100644 --- a/sd.py +++ b/sd.py @@ -1,9 +1,11 @@ import random player=input("玩家出拳") print("玩家出拳结果:"+player) -a=["石头","剪刀","布"] +#玩家出拳结果 +list=["石头","剪刀","布"] computer=random.choice(a) print("电脑出拳结果:"+computer) +#电脑出拳结果 if player in a: if player==computer: print("平局") @@ -11,5 +13,7 @@ if player in a: print("你赢了") else: print("你输了") + #判断输赢 else: - print("输入错误") \ No newline at end of file + print("输入错误") +#判断输入是否有误 \ No newline at end of file