Commit c6213be7 by BellCodeEditor

save project

parent ecd42434
Showing with 19 additions and 3 deletions
sb=input('玩家出拳(石头/剪刀/布)') import random
print('玩家出了'+a) while True:
\ No newline at end of file sb=input('玩家出拳(石头/剪刀/布)')
print('玩家出了'+sb)
xsb=['石头','剪刀','布']
dsb=random.choice(xsb)
print('机器人出了'+dsb)
if sb==dsb:
print('平局')
elif sb=='石头'and dsb=="剪刀":
print('恭喜你,你赢了')
elif sb=='剪刀' and dsb=='布':
print('恭喜你,你赢了')
elif sb=='布' and dsb=='石头':
print('恭喜你,你赢了')
else:
print('很遗憾,你输了')
\ 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