Commit eac7142a by BellCodeEditor

save project

parent 2c8d3065
Showing with 11 additions and 5 deletions
import random import random
# 玩家出拳 # 玩家出拳
shabi = input('你出什么(石头/剪刀/布/)') sb1c = input('你出什么(石头/剪刀/布/)')
print('玩家出拳:'+shabi) print('玩家出拳:'+sb1c)
#计算机 #计算机
sb=['石头','剪刀','布'] sb=['石头','剪刀','布']
sbchu = random.choice(sb) sb2c = random.choice(sb)
print('计算机出拳:' + sbchu) print('计算机出拳:' + sb2c)
\ No newline at end of file if sb2c==sb1c
print('平局')
elif sb1c=='布' and sb2c=='石头' or sb1c=='剪刀' and sb2c=='布' or sb1c=='石头' and sb2c=='剪刀':
print(你赢了)
else:
print(sb,你输了)
\ 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