Commit 58b38b58 by BellCodeEditor

save project

parent 78b89a8b
Showing with 12 additions and 2 deletions
......@@ -4,4 +4,14 @@ hh=["剪刀","石头","布"]
zh=input("输入剪刀/石头/布")
print("玩家出拳:"+zh)
computer=random.choice(hh)
print("电脑出拳:"+computer)
\ No newline at end of file
print("电脑出拳:"+computer)
if zh in hh:
if zh==computer:
print("平局")
elif(zh=="石头" and computer=="剪刀") or (zh=="剪刀" and computer=="布") or (zh=="布" and computer=="石头"):
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