Commit 7cdaffe2 by BellCodeEditor

auto save

parent 25abb509
Showing with 32 additions and 3 deletions
player=input("请出拳:石头/剪刀/布")# 玩家出拳 import random
print("玩家出拳:"+player) while True:
\ No newline at end of file print('输入q退出')
plr=input("林炜庭出拳:石头/剪刀/布")# 玩家出拳
list1 = ['石头','剪刀','布']
cmt = random.choice(list1)
if plr == 'q':
print('即将退出游戏')
break
if plr in list1:
print("林炜庭出拳:"+plr)
print('舒辰兴出拳:'+cmt)
if plr==cmt:
print('平局')
elif plr=='剪刀':
if cmt == '石头':
print('输了')
else:
print('赢了')
elif plr=='石头':
if cmt == '布':
print('输了')
else:
print('赢了')
elif plr=='布':
if cmt == '剪刀':
print('输了')
else:
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