-
Notifications
You must be signed in to change notification settings - Fork 0
/
practising.py
37 lines (36 loc) · 862 Bytes
/
practising.py
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
#handcricket from 0 to 6
import random
s=0
v=0
while (True):
a=random.randint(0,6)
b=int(input("bat"))
print(a,"opponent")
if a==b:
print("you are out")
break
else:
if b==0:
b=a
print(a)
s=s+b
print("-------------",s," Is your score--------------")
while(True):
c = random.randint(0, 6)
d= int(input("bowl"))
print(c,"opponent")
if c == d:
print("opponent is out")
break
else:
if c == 0:
c = d
v = v + c
if v>s:
print("----------------------your opponent is the winner---------------------------")
break
print("------ ",v, "is the opponent score-")
if(s>v):
print(" ----------------------------You are the winner-------------------------------------------")
elif(s==v):
print("the match is drawn")