Commit 631c00dc by BellCodeEditor

save project

parent 220fe62b
Showing with 18 additions and 0 deletions
# 玩家出拳
import random
name=input("请您出拳:石头/剪刀/布")
print("玩家使用了"+name)
list=["石头","剪刀","布"]
comp=random.choice(list)
print(comp)
if comp==name:
print("伤敌一千,自损一万")
elif name=="石头" and comp=="剪刀":
print("赢了,但砸坏了剪刀,赔一个")
elif name=="剪刀" and comp=="布":
print("赢了,但人家布衣没了,给我还一个")
elif name=="布" and comp=="石头":
print("赢了,但布脏了,给我洗了")
else:
print("you are the loser 被赶出赛场")
\ 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