Commit c56025bd by BellCodeEditor

save project

parent c45b5718
Showing with 11 additions and 0 deletions
...@@ -4,3 +4,13 @@ import random ...@@ -4,3 +4,13 @@ import random
xz=["石头","剪刀","布"] xz=["石头","剪刀","布"]
cc=random.choice(xz) cc=random.choice(xz)
print("计算机出拳:"+cc) print("计算机出拳:"+cc)
if xx==cc:
print("平局")
elif xx=="石头" and cc=="剪刀":
print("你赢了")
elif xx=="剪刀" and cc=="布":
print("你赢了")
elif xx=="布" and cc=="石头":
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