Commit 464c9557 by BellCodeEditor

save project

parent fab291dd
Showing with 9 additions and 6 deletions
...@@ -4,9 +4,12 @@ print("玩家出拳:"+yjy) ...@@ -4,9 +4,12 @@ print("玩家出拳:"+yjy)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
sybs=random.choice(list) sybs=random.choice(list)
print("人机出拳:"+sybs) print("人机出拳:"+sybs)
if yjy==sybs: if yjy in list:
print("平局") if yjy==sybs:
elif (sybs=="剪刀" and yjy=="石头")or(sybs=="石头"and yjy=="布")or(sybs=="布"and yjy=="剪刀"): print("平局")
print("玩家赢") elif (sybs=="剪刀" and yjy=="石头")or(sybs=="石头"and yjy=="布")or(sybs=="布"and yjy=="剪刀"):
print("玩家赢")
else:
print("人机赢")
else: else:
print("人机赢") print("输入错误")
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment