Commit b695532a by BellCodeEditor

save project

parent 0c9839bb
Showing with 14 additions and 4 deletions
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
a=random.choices(list)
print('计算机出拳:'+a)
p=input("请出拳:石头/剪刀/布")# 玩家出拳
list=['石头','剪刀','布']
print("玩家出拳:"+p)
a=random.choice(list)
if a == p:
print('平局')
elif a == '石头' and p == '剪刀' or(a=='剪刀' and p=='布') or (a=='布' and p=='石头'):
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