Commit 1d2b2a06 by BellCodeEditor

save project

parent a6faf61f
Showing with 12 additions and 2 deletions
...@@ -3,4 +3,14 @@ print("玩家出拳:"+p) ...@@ -3,4 +3,14 @@ print("玩家出拳:"+p)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
import random import random
c=random.choice(list) c=random.choice(list)
print("计算机"+c) print("计算机"+c)
\ No newline at end of file if p=c:
print("平局")
else:
if c=="剪刀" and p=="石头":
print("恭喜你获胜")
else:
if c=="石头" and p="布":
else:
pass
\ 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