Commit b695532a by BellCodeEditor

save project

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