total tot_1 tot_2 sets s_1 s_2 koef vziatia geimov k_1 int input k_1 k

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
total=0
tot_1=0
tot_2=0
sets=0
s_1=0
s_2=0
# koef vziatia geimov
#k_1= int(input("k_1= "))
#k_2= int(input("k_2= "))
#podacha= int( input("Kto podaet "))
while s_1<2 and s_2<2:
while tot_1<7 and tot_2<7:
if tot_1==6:
if tot_2<=4:
print "Win 1"
print "next set"
tot_1=0
tot_2=0
s_1+=1
break
elif tot_1==7:
print "W_1"
s_1+=1
tot_1=0
tot_2=0
print "next set"
break
if tot_2==6:
if tot_1<=4:
print "Win 2"
print "next set"
tot_1=0
tot_2=0
s_2+=1
break
elif tot_2==7:
print "W_2"
print "next set"
tot_1=0
tot_2=0
s_2+=1
break
win= input("1 ili 2 ")
total=total+1
if win== 0:
tot_1+=1
else:
tot_2+=1
print "score: %s - %s" %(tot_1, tot_2)