Commit f4391a37 by BellCodeEditor

save project

parent 9328189b
Showing with 13 additions and 2 deletions
...@@ -3,4 +3,16 @@ playar=input("请输入剪刀/石头/布") ...@@ -3,4 +3,16 @@ playar=input("请输入剪刀/石头/布")
print("出拳"+playar) print("出拳"+playar)
a=["石头""布","剪刀"] a=["石头""布","剪刀"]
computer=random.choice(a) computer=random.choice(a)
print("电脑出拳:"+computer) print("电脑出拳:"+computer)
\ No newline at end of file if playar==computer:
print("平局")
else playar=="石头" and computer=="剪刀"
print("你赢了")
else playar=="石头" and computer=="布"
print("你赢了")
else playar=="布" and computer=="剪刀"
print("你赢了")
else playar=="剪刀" and computer=="石头"
print("你赢了")
else playar=="剪刀" and computer=="石头"
print("你赢了")
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