#coding=utf-8
import random
#石头剪刀布游戏
def userInput():
while True:
user_input = input('请输入"石头""剪刀""布":')
computer_list = ['石头','剪刀','布']
random_put = random.choice(computer_list)
if user_input == random_put:
print(f'你出 【{user_input}】,电脑出 【{random_put}】,所以平局')
elif user_input == '石头' and random_put == '剪刀' \
or user_input == '剪刀' and random_put == '布' \
or user_input == '布' and random_put == '石头' :
print(f'你出 【{user_input}】,电脑出 【{random_put}】,你赢了')
elif user_input == '石头' and random_put == '布' \
or user_input == '剪刀' and random_put == '石头' \
or user_input == '布' and random_put == '剪刀':
print(f'你出 【{user_input}】,电脑出 【{random_put}】,你输了哦')
else:
print('输入错误!')
break
userInput()