Commit 464c9557 by BellCodeEditor

save project

parent fab291dd
Showing with 9 additions and 6 deletions
......@@ -4,9 +4,12 @@ print("玩家出拳:"+yjy)
list=["石头","剪刀","布"]
sybs=random.choice(list)
print("人机出拳:"+sybs)
if yjy==sybs:
print("平局")
elif (sybs=="剪刀" and yjy=="石头")or(sybs=="石头"and yjy=="布")or(sybs=="布"and yjy=="剪刀"):
print("玩家赢")
if yjy in list:
if yjy==sybs:
print("平局")
elif (sybs=="剪刀" and yjy=="石头")or(sybs=="石头"and yjy=="布")or(sybs=="布"and yjy=="剪刀"):
print("玩家赢")
else:
print("人机赢")
else:
print("人机赢")
\ No newline at end of file
print("输入错误")
\ 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