Commit f8a040df by BellCodeEditor

save project

parent 16ab828e
Showing with 15 additions and 0 deletions
...@@ -4,4 +4,19 @@ import random ...@@ -4,4 +4,19 @@ import random
k=["剪刀","石头","布"] k=["剪刀","石头","布"]
nm=random.choice(k) nm=random.choice(k)
print(nm) print(nm)
if player==nm:
print("平局")
elif player=="剪刀" and nm=="布":
print("你赢了")
elif player=="石头" and nm=="剪刀":
print("你赢了")
elif player=="布" and nm=="石头":
print("你赢了")
else:
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