Commit 0bf9ed02 by BellCodeEditor

auto save

parent a0cbfb52
Showing with 18 additions and 0 deletions
# 玩家出拳 # 玩家出拳
play=input("玩家出/石头/剪刀/布:")
print('玩家出拳:'+play)
import random
list1=['石头','剪刀','布']
s2345=random.choice(list1)
print('计算机出拳',s2345)
if play==s2345:
print('平局')
elif play=='剪刀' and s2345=='布':
print('玩家胜','计算机输')
elif play=='石头' and s2345=='剪刀':
print('玩家胜','计算机输')
elif play=='布' and s2345=='石头':
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