Commit 1a7ccde8 by BellCodeEditor

save project

parent 9bf0b537
Showing with 9 additions and 2 deletions
...@@ -3,4 +3,12 @@ print("玩家:"+hh) ...@@ -3,4 +3,12 @@ print("玩家:"+hh)
import random import random
kk=["剪刀","石头","布"] kk=["剪刀","石头","布"]
jj=random.choice(kk) jj=random.choice(kk)
print("计算机:"+jj) print("计算机:"+jj)
\ No newline at end of file
if hh==jj:
print("平局")
elif hh=="石头"and jj=="剪刀" or hh=="剪刀" and jj=="布" or hh=="布"and jj=="石头":
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