Commit 3dd9aff4 by BellCodeEditor

save project

parent c0de06fd
Showing with 10 additions and 3 deletions
import random import random
i=input("石头|剪刀||请出拳:") i=input("石头|剪刀||请出拳:")
print("玩家出拳:"+i) print("玩家出拳:"+i)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
1=random.choice(list) l=random.choice(list)
print("电脑出拳:"+1) print("电脑出拳:"+l)
if i==l:
print("平局")
elif(i=="石头" and l=="剪刀") or (i=="剪刀" and l=="布") or (i=="布" and l=="石头"):
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