Commit 6cf41a2d by BellCodeEditor

save project

parent b7d97c94
Showing with 12 additions and 2 deletions
...@@ -3,4 +3,14 @@ xxxxx=input("请出拳:石头/剪刀/布") ...@@ -3,4 +3,14 @@ xxxxx=input("请出拳:石头/剪刀/布")
print("玩家出了"+xxxxx) print("玩家出了"+xxxxx)
name=["石头","剪刀","布"] name=["石头","剪刀","布"]
wertt=random.choice(name) wertt=random.choice(name)
print("电脑出了"+wertt) print("电脑出了"+wertt)
\ No newline at end of file if xxxxx==wertt:
print("平局")
elif xxxxx=="石头" and wertt=="剪刀":
print("玩家赢")
elif xxxxx=="剪刀" and wertt=="布":
print("玩家赢")
elif xxxxx=="布" and wertt=="石头":
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