Commit 6cf41a2d by BellCodeEditor

save project

parent b7d97c94
Showing with 11 additions and 0 deletions
...@@ -4,3 +4,13 @@ print("玩家出了"+xxxxx) ...@@ -4,3 +4,13 @@ print("玩家出了"+xxxxx)
name=["石头","剪刀","布"] name=["石头","剪刀","布"]
wertt=random.choice(name) wertt=random.choice(name)
print("电脑出了"+wertt) print("电脑出了"+wertt)
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