from random import randint
def ball(me_point,c_point):
for i in range(0,3):
me = int (input())
computer = randint(1,10)
if me != computer:
me_point += 1
print('你:电脑 \n %d:%d'%(me_point,c_point))
else:
c_point += 1
print('你:电脑 \n %d:%d'%(me_point,c_point))
me = int (input())
computer = randint(1,10)
if me == computer:
me_point += 1
print('你:电脑 \n %d:%d'%(me_point,c_point))
else:
c_point += 1
print('你:电脑 \n %d:%d'%(me_point,c_point))
flag = (3-i)*4
if (me_point - c_point)>flag or (c_point - me_point)>flag:
break
if me_point!=c_point:
if me_point>c_point:
print('你赢了!')
else:
print('电脑赢得了这场比赛..')
else:
print('平局,继续游戏')
ball(me_point,c_point)
ball(0,0)
三轮为一局,一轮分玩家主场与电脑主场。