Commit 17dfc3a5 by BellCodeEditor

save project

parent 6f1532e7
Showing with 15 additions and 7 deletions
...@@ -6,9 +6,18 @@ list=["石头"+"剪刀"+"布"] ...@@ -6,9 +6,18 @@ list=["石头"+"剪刀"+"布"]
compurt=random.choice(list) compurt=random.choice(list)
print=("电脑出拳:"+compurt) print=("电脑出拳:"+compurt)
if player==compurt
print("平局")
elif(player=="石头"and compurt=="剪刀")or(player=="剪刀"and compurt=="布")or(player=="布"and compurt=="石头")
print("你赢了")
else:
print("输了")
\ No newline at end of file
import random
player=input(("请出拳):")
list=["石头","剪刀"",""]
compurt=random.choice(list)
print=("电脑出拳:"+compurt)
print=("玩家出拳:"+player)
if
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