Commit 7212280f by BellCodeEditor

save project

parent 89cfb691
Showing with 13 additions and 4 deletions
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
nb=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+nb)
list=['剪刀','石头','布']
sb=random.choice(list)
print('sb出拳:'+sb)
\ No newline at end of file
print('sb出拳:'+sb)
if nb==sb:
print('这下平了')
elif nb=='石头'and sb=='剪刀':
print('赢了')
elif nb=='剪刀'and sb=='布':
print('赢了')
elif nb=='布'and sb=='石头':
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