Commit 8141c87f by BellCodeEditor

auto save

parent 23dfff73
Showing with 19 additions and 0 deletions
import random
while True:
player = input('::')
list = ['石头 ','剪刀','布']
cper = random.choice(list)
if player == 't':
print('游戏结束')
break
if player in list:
print('玩家:'+player,'电脑:'+cper)
if player == cper:
print('平局')
elif player == '石头' and cper == '剪刀' or player == '布' and cper == '石头' or player == '剪刀' and cper == '布':
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