Commit ba8c761e by BellCodeEditor

save project

parent bfa99ef2
Showing with 12 additions and 3 deletions
# 玩家出拳
player=input("请出拳(剪刀/石头/布)")
print("玩家出"+player)
print("玩家出"+player)
import random
list=["剪刀","石头","布"]
dn=random.choice(list)
print("电脑出:"+dn)
\ No newline at end of file
print("电脑出:"+dn)
if player in list:
if player==dn:
print("平局")
elif (player=="石头" and dn=="剪刀") or (player=="剪刀" and dn=="布") or (player=="布" and dn=="石头"):
print("获胜")
else:
print("失败")
else:
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